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

How ASP.NET page works?

685


Explain how dot net compiled code will become platform independent?

521


Explain the use of fragment caching.

679


What is the difference between Session and response.Redirect?

625


Explain difference between dataset and datareader?

612






How can we call webservices in Banking Applications? and where we are using it?

1544


Does google crawl redirects?

532


Why SessionID changes in every request in asp.net?

554


what are the events raised in asp.net page life cycle?in which stage view state can be loaded?

563


What is AutoPostback?

609


Define the types of configuration files.

542


Describe the diffeerence between inline and code behind?

520


What are the advantages and disadvantages of session?

674


What do you mean by role-based security?

573


What is global.asax file used for?

569