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 |
Dategrid filtering and sorting How can we sort all the fields at once?
Authentication and Authorization
why we should use more than one web.config files in our application? I have two web.config files in my application. One in the root directory and another one inside a sub folder. When the application runs which web.config file will run? why?
What is the use of the tag in the web.config file?
Write a code for sending an email from asp.net application.
Is object a value type or referenced type?
How many types of cookies are there in asp.net?
Explain the asp.net mvc request life cycle? : asp.net mvc
1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5
how can u create the forms authentication?and what is the difference between forms authentication and windows authentication?
How can we prevent an aspx page get refreshed when any information fetch from the database ?
Which control would you use if you needed to make sure the values in two different controls matched?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)