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 advantages of using Master Pages?
How do you insert multiple rows from a grid view to database table under a single transaction?
what is .net
What is the purpose of session management?
Define common type system?
What is the current version of asp.net?
What is interval time of GC in .net
Explain weak typing and strong typing.
Features in ASP.NET ?
What are user controls?
1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?