When a dropdownlist has been added by some records and it
has been binded why it is not executing i'm facing this
error pls help me ?
if (is!pageposback)
{
arraylist books = new arraylist;
books.add ("gone with the wind");
books.add ("rahulsriramprakash");
books.add ("vishal");
dropdowndisplay.datasource=books;
dropdowndisplay.databind();
}
The error is :
1) The dropdowndisplay does not exist.
Answer Posted / tarun
instead of arrayList use HashTable
and create one bindingsourse
BindingSource bs=new BindingSource();
HashTable hs=new HashTable();
hs.Add("Value","Key");
bs.dataSource=hs;
dropdowndisplya.datasource=bs;
dropdowndisplay.databind();
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the new features implemented in ASP.NET?
Explain the difference between server.transfer and response.redirect? Why would I choose one over the other?
What is mta?
What is advantage of code behind coding in ASP.NET?
Is it possible for me to change my aspx file extension to some other name?
Mention few asp.net validators.
What are the parts of an http response?
Explain how is a property designated as read-only?
How can u deifne the benefits and limitation of using Viewstate for state management?
Explain the difference between codebehind="mycode.aspx.cs" and src="mycode.aspx.cs"?
Define view state.
Let's say I have an existing application written using vb6 and this application utilizes windows 2000 com+ transaction services. How would you approach migrating this application to.net?
What are session cookies?
how to retrieve property settings from xml .config file.
Explain how can we inherit a static member?