.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 >> ASP.Net >> Post New Question Subscribe to Interview Questions

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.

Posted By :Jean Paul     Posted Date :December 24, 2010    Points :15   Category :ASP.Net 
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.

You can also find related Interview Question to 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.  below: 

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?

  
As ViewState is not storing the DataSource property.

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

cross page posting in ASP.NET2.0???

  
When we have to post data from one page to another in application we used server.transfer method but in this the URL remains the same but in cross page posting there is little different there is normal post back is done but in target page we can access values of server control in the source page.This is quite simple we have to only set the PostBackUrl property of Button,LinkButton or imagebutton which specifies the target page.In target page we can access the PreviousPage property.And we have to use the @PreviousPageType directive.We can access control of PreviousPage by using the findcontrol method.When we set the PostBackURL property ASP.NET framework bind the HTML and Javascript function automatically. (More...)

Does ViewState is responsible for maintaining data across the Page Post Back for Postback controls (like textbox, dropdownlist) and non-postbackcontrols(like label)?

  
It is false. For NonPostback controls it is true but for postback controls, ASP.NET retrieves their values one by one from the HTTP request and copies them to the control values while creating the HTTP response. (More...)

List the various stages of Page-Load lifecycle.

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

What is Cross-Page Posting?

  
Whenever you send a request to the server it sends request to the same page. Cross_page posting means it will send request to the another page. we can achieve. this through postback url property (More...)

Can we add more than one master page to our web application?

  
Yes We can add more than one master page to our web application (More...)

How to change the default page of a Silverlight application?

  
In a simple way we can set the default page, what we have to do is to change the default page of a silverlight application, we have to set the RootVisual property inside the Application_Startup event of the App.xaml file.


private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}
(More...)

Would the select query below fetch any records?



create table #testvm (ID int)

select * from sysobjects where name = '#testvm'

drop table #testvm

  
No..

Since temp tables are created in tempdb, and use a random name, the query will not work.

If you used a query like this, you would see your table:

select * from tempdb..sysobjects where name like '#testvm%' (More...)

Difference between Server.Transfer and Cross Page Posting

  
In 'Server.Transfer', the URL doesn't change whereas in cross page posting, the form is submitted to a different page, thereby changing the url.
The Server.Transfer method is a server-based operation whereas cross-page postback is a client-based transfer. (More...)

What is Cross Page Posting? How is it done?

  
By default, ASP.NET submits a form to the same page. In cross-page posting, the form is submitted to a different page. This is done by setting the 'PostBackUrl' property of the button(that causes postback) to the desired page. In the code-behind of the page to which the form has been posted, use the 'FindControl' method of the 'PreviousPage' property to reference the data of the control in the first page. (More...)

List the ways you can get total number of records in a table?

  
select count(*) from tablename
select rows from sysindexes where id=OBJECT_ID(tablename) and indid < 2
select * from tablename (More...)

How Do you bind a Drop-Down Listbox with a Column in SharePoint List ?

  

Ans.
Method 1 : You can get a datatable for all items in the list and add that table to a data set. Finally, specify the dataset table as datasource for dropdown listbox.

Method 2 : You can also use SPDatasource in your aspx or design page.
See Code example Binding Drop-Down with Sharepoint List data (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