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 is the most appropriate lifetime for a database connection/orm context in an asp.net mvc application? : Asp.Net MVC
What is asp.net used for?
Explain how can we inherit a static member?
What is difference between or and orelse?
What is redirecting behavior?
List the events in page life cycle.
What is the difference between response.redirect and server.transfer?
Diff between web user control and web custom control?
Which protocol is used to call a web service?
What is asp.net mvc? : asp.net mvc
What do you mean by role-based security?
What is the difference between mechine.config and web.config?
What is the use of worker process in asp.net?
How do I open an ashx file in windows 7?
Describe session handling in a webfarm?