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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why would anyone need to implement their own hashtable or linked list?

2542


Give a few examples of page life cycle events.

766


Explain the asp.net page life cycle.

658


Define managed code and managed data in .net?

597


How many types of validation are there?

617






To get the values in two different controls to match which control you use it?

650


Explain the steps needed to be performed in order to create an animation in xaml?

647


How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here.

1536


What are the different properties of server control that exists?

655


What is voluum?

639


What are the Types of objects in ASP

656


Explain model, view and controller represent in an mvc application? : asp.net mvc

594


How is session id generated?

551


Why is mvc better than asp.net?

614


Can you change a Master Page dynamically at runtime?

664