Geeks With Blogs
AzamSharp Some day I will know everything. I hope that day never comes.

There is a new AppendDataBoundItems property available in ASP.NET 2.0 framework which allows you to add items to the ListControls even if the ListControl is bound to the data source. In ASP.NET 1.X we used to add the default item in the collection which we were binding to the List but in ASP.NET 2.0 you can simply add the item in the DropDownList or any List control.

<asp:DropDownList ID="ddlCategories" runat="server" AppendDataBoundItems="true">

<asp:ListItem Text="Select a category" />

</asp:DropDownList>

Pretty cool right!

 

Posted on Sunday, August 20, 2006 4:32 PM | Back to top


Comments on this post: ListControl.AppendDataBoundItems

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net