Select Category 
 

Asp.Net Interview Questions Answers

Asp.Net Interview Question - 121 : -

How do you register JavaScript for webcontrols ?

Asp.Net Interview Answer - 121 : -

  You can register javascript for controls using <CONTROL -name>Attribtues.Add(scriptname,scripttext) method.
 

Asp.Net Interview Question - 122 : -

Explain the differences between Server-side and Client-side code?

Asp.Net Interview Answer - 122 : -

 

Server side scripting means that all the script will be executed by the server and  interpreted as needed. ASP doesn't have some of the functionality like sockets, uploading,  etc. For these you have to make a custom components usually in VB or VC++. Client side  scripting means that the script will be executed immediately in the browser such as form field validation, clock, email validation, etc. Client side scripting is usually done in  VBScript or JavaScript. Download time, browser compatibility, and visible code - since  JavaScript and VBScript code is included in the HTML page, then anyone can see the code by viewing the page source. Also a possible security hazards for the client computer.

 

Asp.Net Interview Question - 123 : -

What are the different types of Session state management options available with ASP.NET?

Asp.Net Interview Answer - 123 : -

ASP.NET provides In-Process and Out-of-Process state management.  In-Process stores the session in memory on the web server.  This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server.  Out-of-Process Session state management stores data in an external data source.  The external data source may be either a SQL Server or a State Server service.  Out-of-Process state management requires that all objects stored in session are serializable.
 

Asp.Net Interview Question - 124 : -

True or False: A Web service can only be written in .NET?

Asp.Net Interview Answer - 124 : -

False
 

Asp.Net Interview Question - 125 : -

What are different types of directives in .NET?

Asp.Net Interview Answer - 125 : -

 

@Page: Defines page-specific attributes used by the ASP.NET page parser and compiler.  Can       be included only in .aspx files <%@ Page AspCompat="TRUE" language="C#" %>

@Control:Defines control-specific attributes used by the ASP.NET page parser and        compiler. Can be included only in .ascx files. <%@ Control Language="VB" EnableViewState="false" %>


@Import: Explicitly imports a namespace into a page or user control. The Import         directive cannot have more than one namespace attribute. To import multiple     namespaces
,     use multiple @Import directives. <% @ Import Namespace="System.web" %>

@Implements: Indicates that the current page or user control implements the specified .NET      framework interface.<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %>

@Register: Associates aliases with namespaces and class names for concise notation in   custom server control syntax.<%@ Register Tagprefix="Acme" Tagname="AdRotator" Src="AdRotator.ascx" %>

@Assembly: Links an assembly to the current page during compilation,<span style="FONT-SIZE: 9pt;

 

Asp.Net Interview Question - 126 : -

What does WSDL stand for?

Asp.Net Interview Answer - 126 : -

Web Services Description Language.
 

Asp.Net Interview Question - 127 : -

 What are VSDISCO files?

Asp.Net Interview Answer - 127 : -

 

VSDISCO files are DISCO files that support dynamic discovery of Web services. If you place the following VSDISCO file in a directory on your Web server, for example, it returns   references to all ASMX and DISCO files in the host directory and any subdirectories not noted in <exclude> elements:


             <?xml version="1.0" ?>
                <dynamicDiscovery
                  xmlns="urn:schemas-dynamicdiscovery:disco.2000-03-17">
                  <exclude path="_vti_cnf" />
                  <exclude path="_vti_pvt" />
                  <exclude path="_vti_log" />
                  <exclude path="_vti_script" />
                  <exclude path="_vti_txt" />
                </dynamicDiscovery>  

 

Asp.Net Interview Question - 128 : -

What data types do the RangeValidator control support?

Asp.Net Interview Answer - 128 : -

Integer, String, and Date.
 

Asp.Net Interview Question - 129 : -

Which method do you use to redirect the user to another page without performing a round trip to the client?

Asp.Net Interview Answer - 129 : -

  Server. transfer
 

Asp.Net Interview Question - 130 : -

Can you explain what inheritance is and an example of when you might use it?

Asp.Net Interview Answer - 130 : -

  When you want to inherit (use the functionality of) another class. Example: With a base class named Employee, a Manager class could be derived from the Employee base class.