.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

In the page load event I assigned DropDownList's DataSource property to a valid list. On the submit button click.. the same DataSource property is coming as null. Why?

Posted By :Jean Paul     Posted Date :October 26, 2010    Points :10   Category :.NET Framework 
As ViewState is not storing the DataSource property.

We have to use Items property of DropDownList to get the items back.

You can also find related Interview Question to In the page load event I assigned DropDownList''s DataSource property to a valid list. On the submit button click.. the same DataSource property is coming as null. Why?  below: 

You are working on an ASP.NET application. One of the drop down list contans 1 lakh records. The page posting becomes very slow. How to overcome this? You just need the selected index of the dropdownlist on submit.

  
Use EnableVieState=false. On the dropdown change event, set a hidden field value to the selected index.

Disabling view state helps us in reducing the postback load. (More...)

What is the difference between ListBox (Filled with data) and DropDownList (Filled with data), in terms of SelectedIndex property?

  
The default value of the SelectedIndex property of the Listbox is -1, which indicates that no item is selected in the Listbox. However, the DropDownList control overrides this property and sets the default value to 0, which indicates the first item in the list. (More...)

List the various stages of Page-Load lifecycle.

  
o Init()
o Load()
o PreRender()
o Unload() (More...)

How can we call javascript function in page load event?

  
this.button.Attributes.Add("OnClick",return functionname(););
(More...)

Which method is used to generate the click event of the Control class for the Button control in C#?

  
The PerformClick() method of the Button class is used to generate the Click event of the System.Windows.Forms.Control class. (More...)

What is isPostback property?

  
This property is used to check whether the page is being loaded and accessed for the first time or whether the page is loaded in response to the client postback.
Example:-
Consider two combo boxes In one lets have a list of countries In the other, the states. Upon selection of the first, the subsequent one should be populated in accordance. So this requires postback property in combo boxes to be true. (More...)

Explain about the readystate Property.

  
Readystate property holds the response of the server to the query generated from the client side. Each time the readystate property changes onreadystatechange function will be executed. Some of the values for the readystate property are as follows if the status is zero the request is not initialized, 1 the request has been set up, 2 the request has been sent, 3 the request is in process, 4 the request is complete. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend