ASP.NET Interview Questions and Answers (1544) - Page 10

What is LINQ

NOTE: This is objective type question, Please click question title for correct answer.
You need to obtain performance information about your Web Application. You should use which of the following?

NOTE: This is objective type question, Please click question title for correct answer.
What launch conditions do Web Setup Projects include by default?

By default, Web Setup Projects check for IIS and the .NET Framework.
What are the four phases of a Web Setup Project deployment?

Install, Commit, Rollback, and Uninstall.
Is it possible to update a connection string stored in the Web.config file programatically? If Yes, then how?

Yes.

Create a Configuration object. Then, update the connection string using the ConnectionStrings collection. Finally, call Configuration.Save.
You catch an unhandled exception in a Page_Error handler. How can you access the last error?

NOTE: This is objective type question, Please click question title for correct answer.
What is the difference between Postback and callback?

Callback send a request to the web page from the client script. A client side function will send request to the server and a marked method is invoked on the
server. It does the processing on the server and returns the result back to the client. To enable client side callbacks, ICallbackEventHandler interface needs to be used and one need to implement RaiseCallBackEvent & GetCallBackResult function.

Where Postback sends the form data to the server. The server processes the data and sends it back to the browser. The page goes through its full life cycle and is rendered on the browser.

Callback does not redraw the page where postback does.
which namespace is used to implement active directory services?

NOTE: This is objective type question, Please click question title for correct answer.
In an ASP.NET website, when the web.config file is getting called?

NOTE: This is objective type question, Please click question title for correct answer.
What is the Difference between RegisterStartupScript and RegisterClientScriptBlock?

RegisterStartupScript Places the script at the bottom of the asp.net page instead of at the top. and RegisterClientScriptBlock inserts script immediately below the opening tag of the Page . means after <form> tag.
By Default, ASP.NET does not allow HTML tags to be sent to server via client side due to security reason. Which property needs to be set that allows HTML tags to be processed by server?

ValidateRequest Property needs to be set to false. By default it's true so it does not allow unencoded HTML tags to be processed at server. It can be set at page level or at application level via web.config.
When file upload control is used, you can add maximum 4 mb size of the file. Using which property one can extend the limit of file size?

MaxRequestlength Property needs to be set. It takes value in KB. It can support max 2GB file.
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.
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.
Which component is required for all pages that use Web Parts?

NOTE: This is objective type question, Please click question title for correct answer.
How can you define a control property using a global resource at design time?

NOTE: This is objective type question, Please click question title for correct answer.
What can you do to make a Web page more useful to a user who does not use a mouse?

There are number of things which can be done so that Site can be accessed without a mouse.

1.Provided access keys for all the controls.You can use access keys for Web controls using AccessKey property.
2. Define Logical Tab order.
3. Specify default button on the form.
4. Set default focus on the form in a logical location where data entry normally begins.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories