ASP.NET Exclusive Interview Questions and Answers (348) - Page 16

  • A joint initiative from DotNetFunda.Com and Questpond.
  • A one stop place on the internet to get trusted and proven Interview Questions (based on more than a decade of experience in this field) to ensure the success of the candidates.
  • You will find almost all Interview questions from Questpond here and this list is growing day by day with all latest and updated interview questions.

348 records found.

Get 650+ Questpond's Interview videos on discount

Why is HTTP protocol referred as "Stateless"?

Because the HTTP Server / Web Server forgets everything submitted by the client once the output of the page is rendered from server to Web Browser and every for every request browser will have to establish a fresh request with the server
What is that HTTP Request Structure and HTTP Response Structure made up of.

HTTP Request Structure (Browser->Server)

1. Request Line.
2. Request Header.
3. Message Body (Posted Data).

HTTP Response Structure(Server->Browser)

1. Status Line.
2. Response Headers.
3. Message Body (Page Content).
___________ Property Returns an instance of CultureInfo class that represents the culture for culture-specific resources.

NOTE: This is objective type question, Please click question title for correct answer.
To use personalization, you must use controls within a ____________ so they will have Web Parts functionality.

NOTE: This is objective type question, Please click question title for correct answer.
What is the difference between HTTP method Get and Post?

GET Method:

1.All the name value pairs are submitted as a query string.
2.It’s not secured as submitted text is visible in plain text format in the Location bar of the web browser.
3.Length of the submitted string is restricted.
4.If get method is used and if the page is refreshed it would not prompt before the request is submitted again.

POST Method:

1.All the name value pair’s are submitted in the Message Body of the request structure.
2.Length of the string (amount of data submitted) is not restricted or limited.
3.Post Method is secured because Name-Value pairs cannot be seen in location bar of the web browser.
4.If post method is used and if the page is refreshed it would prompt before the request is submitted again.

As a general thumb rule if the form submitted changes the state or data on server then the request method used can be post otherwise if the data submitted doesn’t affect the server then the request method used can be post.

When we submit a search string to search string then the request method can be "get" because the submission will not change the state of server.
___________ Method Returns an object that represents the format of a specified type.

NOTE: This is objective type question, Please click question title for correct answer.
In the URL – http://www.bestdotnettraining.com:X/default.aspx What is X?

Port number and when nothing is mentioned browser uses the default value as 80
The resource file for default culture should be _______________, and for any other culture _________________

NOTE: This is objective type question, Please click question title for correct answer.
When the form is submitted, For check box what is submitted when it is not checked?

Input type="checkbox" submits name and value pair only if the checkbox is checked otherwise nothing is submitted.
If value is not provided the default value posted is “on”
How do we group radio buttons in a form tag?

To group radio buttons, same name must be given to them. And only the name-value pair of the radio button selected will be submitted to server.
If multiple options are selected in listbox, then what is submitted?

With same name different values (multiple pairs) of all the selected items is submitted to server
Can a HTML form tag have more than one submit button?

A form can have more than one submit button, but only the name-value pair of the submit button used to post the form is included with the request.
Web Parts are equivalent to __________, but don't necessarily require a web portal such as SharePoint to host them.

NOTE: This is objective type question, Please click question title for correct answer.
What is the additional attribute required in the form tag if the form has <input type="file" …>

If the form has input type="file" to upload a file along with request then its enctype="multipart/form-data" and method="post".
______________ Assemblies are resource-only assemblies that contain only culture-specific resources?

NOTE: This is objective type question, Please click question title for correct answer.
What are the 3 different ways to globalize web applications?

Detect and redirect approach : In this approach we create a separate Web application for each supported culture, and then detect the user’s culture and redirect the request to the appropriate application. This approach is best for applications with lots of text content that requires translation and few executable components.
Run-time adjustment approach : In this approach we create a single Web application that detects the user’s culture and adjusts output at run time using format specifiers and other tools. This approach is best for simple applications that present limited amounts of content.
Satellite assemblies approach : In this approach we create a single Web application that stores culture-dependent strings in resource files that are compiled into satellite assemblies. At run time, detect the user’s culture and load strings from the appropriate assembly. This approach is best for applications that generate content at run time or that have large executable components.
What are the steps to follow to get user's culture at run time?

To get the user’s culture at run time, follow these steps:
1. Get the Request object’s UserLanguages property.
2. Use the returned value with the CultureInfo class to create an object representing the user’s current culture.
For example, the following code gets the user’s culture and displays the English name and the abbreviated name of the culture in a label the first time the page is displayed:
private void Page_Load(object sender, System.EventArgs e)
{ // Run the first time the page is displayed if (!IsPostBack) { // Get the user's preferred language.
string sLang = Request.UserLanguages[0]; // Create a CultureInfo object from it.
CultureInfo CurrentCulture = new CultureInfo(sLang);
lblCulture.Text = CurrentCulture.EnglishName + ": " + CurrentCulture.Name;
}
}

More ASP.NET Interview Questions & Answers here

Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Exclusive Interview Questions and Answers Categories