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
Can we have multiple web config files for an asp.net application?
What is custom attribute? How to create?
Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc
Any disadvantages in Dataset and in reflection ?
What are demand-paging and pre-paging?
Where you store Connection string in "Web.Config" file in ASP.NET?
How to use push notification?
How do you store a value in viewstate and retrieve them?
Differentiate globalization and localization.
What is http post and http get?
What does mvc represent in asp.net? : asp.net mvc
What is Partial PostBack in ASP.NET?
Which adapter should you use, if you want to get the data from an access database?
What is the use of placeholder control?
What are early binding and late binding.