Loading ...

Who is online?  0 guests and 0 members
home  »  blogs  »  Vijendra Shakya: November 2009

Communifire Blogs

Vijendra Shakya :November 2009 postings

Vijendra Shakya

Find Maximum value from an Enum

11/29/2009 by Vijendra Shakya · 2 · 3397

Here I have discussed find the maximum value from enum. Suppose we have an enum like: public enum TestEnum { A=1, X=2, E=3, R=4, O=5 } if our enum have values like above(Incremented by one),then we can Find the Max enum values like as follows: String strMaxEnumValue = Enum .GetValues( typeof ( TestEnum )).Cast< TestEnum >().Last().ToString(); It returns last element of the sequence...

Vijendra Shakya

What is Paged DataSource?

11/12/2009 by Vijendra Shakya · 0 · 3222

PagedDataSource is a class which encapsulates the paging related properties which is required to perform paging in data bound control like Repeater/DataList. PagedDataSource class comes under System.Web.UI.WebControls namespace. PagedDataSource contains following common properties: PageSize: It Defines number of records shown on the page. it’s default value is 10. AllowPaging: Indicating...

Vijendra Shakya

Find Date after a given week(s) or month(s)

11/4/2009 by Vijendra Shakya · 1 · 2335

Here I am discussing to find date after a given week or months. For example I want to find the date after 1 week or 2 months from today. Find date after 2 week or 2 months then we can achieved this as like: DateTime dateTime = DateTime.Now.AddDays(14); //we can also do this as DateTime.Now.AddDays(2*7) DateTime dateTime1 = DateTime.Now.AddMonths(2); The output will be: 11/18/2009 3:59:43...

Page 1 of 1 (3 items)

Product Spotlight

ASP.NET Hosting Spotlight

Join CodeAsp.Net for FREE Today!

It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.

enter your email address:

 

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?