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 new login controls in asp.net 2.0?

0 Answers  


What is the difference between file-based dependency and key-based dependency?

0 Answers  


hi all, can we sort the data set without using the gridview sort method

1 Answers   CGI,


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.

0 Answers   eMids,


Define repository pattern in asp.net mvc? : asp.net mvc

0 Answers  






Explain the life cycle of an ASP .NET page.

2 Answers  


how to get the vb6.0 COM Component in to the .Net application?

3 Answers   iSoft,


what is service contract,operation contract?

2 Answers  


Why we use content place holder in asp.net?

0 Answers  


Explain about consistent programming model in the .NET framework?

0 Answers  


How you can access the values from the Repeater control in ASP.NET?

0 Answers  


What is the difference between Webservice and WCF

9 Answers   IBM, ITC Infotech,


Categories