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.
Answers were Sorted based on User's Feedback
Answer / rajesh
make sure that dropdownlist is there in the webform
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sujit biswas
if (!IsPostBack)
{
ArrayList books=new ArrayList();
books.Add("gone with the wind");
books.Add("rahulsriramprakash");
books.Add("vishal");
dropdowndisplay.DataSource = books;
dropdowndisplay.DataBind();
}
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / vyas pyk
though u have the control in the web form some times is
shows like that onle,
the solutions is u better delete the control and add it
again u will get it
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rahul
Even i tried with that even it's saying the same error.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
What are the new login controls in asp.net 2.0?
What is the difference between file-based dependency and key-based dependency?
hi all, can we sort the data set without using the gridview sort method
Take a Large textbox allow to type any data. Task 1:display the count of vowels in a lable on key press event of the textbox Task 2:dispaly count of dates in a lable when dates in following foramats:dd/mm/yy , mm/dd/yy , yy/mm/dd. Task3:compare 2 dates and display both are same or not which dates are in dd/mm/yy and mm/dd/yy farmats.
Define repository pattern in asp.net mvc? : asp.net mvc
Explain the life cycle of an ASP .NET page.
how to get the vb6.0 COM Component in to the .Net application?
what is service contract,operation contract?
Why we use content place holder in asp.net?
Explain about consistent programming model in the .NET framework?
How you can access the values from the Repeater control in ASP.NET?
What is the difference between Webservice and WCF