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

Can you set the session out time manually?

0 Answers  


What is a 1x1 pixel?

0 Answers  


Explain diff. Betn dataset and recordset?

0 Answers  


what is silver light when will we use silver light,

0 Answers  


What is the purpose of the validation summary control? What do you need to do to prevent an error message from being displayed in a validator when a validation summary control is used? How can you display a message in both the validator and the validation summary control?

2 Answers  






How do I send an email message from my ASP.NET page?

0 Answers  


Describe the application event handlers in ASP.NET?

0 Answers   HCL,


Which namespace do the classes, allowing you to support COM functionality, are located?

1 Answers  


Why we go for mvc instead of asp.net? : Asp.Net MVC

0 Answers  


Explain difference between dataset and datareader?

0 Answers  


which one is faster execute reader, scalar, execute non query ?

18 Answers   Intiger, Minecode,


Can we use http handlers to upload a file in asp.net?

2 Answers  


Categories