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 security types in ASP/ASP.NET? Different Authentication modes?
Explain login control and form authentication.
What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?
what are the Custom controls in asp.net?
If you are using two select queries and retrieving data. how do you access second query's result set using data reader?
What is full trust in asp.net?
Explain about solution explorer window?
What is aspect-oriented programming?
What is httpresponse?
What are the steps to follow to host a web application on a web server?
What is asp.net version?
What is mvc in asp.net tutorial? : Asp.Net MVC
What setting must be added in the configuration file to deny a particular user from accessing the secured resources?
What is asp.net? How is it different from asp?
How do you do Client-side validation in .Net?