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



When a dropdownlist has been added by some records and it has been binded why it is not executing i..

Answer / rajesh

make sure that dropdownlist is there in the webform

Is This Answer Correct ?    2 Yes 0 No

When a dropdownlist has been added by some records and it has been binded why it is not executing i..

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

When a dropdownlist has been added by some records and it has been binded why it is not executing i..

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

When a dropdownlist has been added by some records and it has been binded why it is not executing i..

Answer / rahul

Even i tried with that even it's saying the same error.

Is This Answer Correct ?    0 Yes 0 No

When a dropdownlist has been added by some records and it has been binded why it is not executing i..

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

Post New Answer

More ASP.NET Interview Questions

what are the attributes of sitemapnode?

3 Answers   Satyam,


How to refresh a page in asp.net

4 Answers  


Can we use multiple forms in single asp.net application?

3 Answers   Polaris,


What are the different Key TreeView Properties in Asp.net 2.0?

1 Answers   TCS,


Which tool you have done?

0 Answers  






What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?

2 Answers  


how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool

0 Answers   Satyam,


Which Is Faster MVC or ASP.net ?

0 Answers   Arigo Infotech,


Is there any property names “isnavigating”?

0 Answers  


is it possible to persiste customize object in view state? how it is?

2 Answers  


What is session object? Describe in detail.

0 Answers  


Give an example of what might be best suited to place in the application_start and session_start subroutines?

0 Answers  


Categories