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
14. What are your Future Plans for Swatz Oils GROUP U.K?
Where code pages are used?
What is the difference between typeof() vs gettype()?
What is round trip in asp.net?
How to include silver light .xap page into asp.net web application and what is the purpose of using silverlight application?
What is the maximum timeout we can set for Cookies?
What is redirectpermanent in asp.net?
What is sta?
Explain page output caching?
What is a page life cycle?
What is the difference between session and viewstate in asp.net?
Does web services support data reader like pom project?
What is a SESSION and APPLICATION object?
Explain client-side scripting?
What is sql data source control in asp.net?