You are on page 1of 138

ASP.

NET Interview Questions (594)


Submit | .NET Interview FAQs | Interview Home | Search | Exclusive

Interview Home |

Now you don't need go anywhere to get the best interview questions on Microsoft technology. We are trying to gather all real interview questions asked from MNCs and put them here. You can also assist us in doing so by submitting .net interview questions. These questions are generally different from certification questions however it may help you in that too.

What is the use of DataSet.CaseSensitive property?


Posted by: Tripati_tutu

If the CaseSensitive property of a DataSet is set to true, then the string comparisons for all the Dat dataset will be case sensitive. By default the CaseSensitive property is always false.

How you can roll back all the changes made to a DataSet when it was created?
Posted by: Tripati_tutu

By invoking the DataSet.RejectChanges() method, you can undo or roll back all the changes made when it was created.

What is Screen Scraping ?


Posted by: Chvrsri

It means reading the contents of the Let us assume www.rediff.com website. If we browse into that site the interface which we could see inc controls but we cannot see what is the URL of those links and what are the properties of tho What Screen Scraping does is that it will pull the HTML related data into the webpage.

What is the use of DIAGNOSTICS namespace in C#.Net?


Posted by: Chvrsri

It is a collection of classes which makes two options available to the development of any application 1) It will enable to Debug the

2) It will allow to follow the execution of the application.

When were Partial Methods intorduced ? (FrameWork )


Posted by: Chvrsri

NOTE: This is objective type question, Please click question title for correct answer.

Which of the following is false regarding Constructors? a)There can be only one static constructor in the class b constructor should be without parameters c)Static constructor can be used to intialize both Static mem nonStatic members d)There should be no access modifier in static constructor definition
Posted by: Chvrsri

NOTE: This is objective type question, Please click question title for correct answer.

Where does Static variables store ?


Posted by: Chvrsri

Static variables are stored on the Heap of the memory. It is not dependent on whether it is dec reference type or a value These variables will be in the memory till the time program ends.

What is the Difference between Internal and Protected Internal Access Modifiers?
Posted by: Chvrsri

Internal

It can be accessed by any code in the same assembly but cannot be accessable in anoth

Protected

Internal

It can be accessed by any code in the same assembly, or by any derived class in another assembly. F project.

What is the co-relation and difference between HTTP handlers and HTTP modules?
Posted by: Tripati_tutu

The co-relation between HTTP handler and HTTP module is both are an integral part of the ASP.NET a each request is being send by the user for processing, the request will process by multiple HTTP mod that the request is processed by a single HTTP handler. When a request is processed by HTTP han request goes back to the user through HTTP

The handlers are used to process individual endpoint requests made by the user. It returns a respons that is identified by a file name extension. It also enables ASP.NET application to process the HTTP U and is implementing the IHttpHandler interface, which is located in the System.Web namespace. These to Internet Server Application Programming Interface (ISAPI)

The modules are used to invoke all requests and responses made by the user. It is executed before handler executes. It also enables user to modify each individual request. These modules implementin interface, which is located in the System.Web namespace.

What is the difference between Named skins and Default skins?


Posted by: Tripati_tutu

When you are applying any theme to a page, then by default the Default skin applies to all controls of that page. This skin is default for a control if it does not have SkinID attribute. Suppose you create a d a Calendar control, then the control skin applies to all Calendar controls on pages that use

But the named skin controls have their SkinID property. It is not applying skin attributes automatically type, but it facilitates to apply explicitly a named skin to a control by changing the control's SkinID prop you to set different skins for different instances of the same control in an application.

Explain 3 levels at which a theme can be applied for a web application?


Posted by: Tripati_tutu

At

page

level -

Use

the

Theme

or

StyleSheetTheme

attribute

of

the

Pag

At application level - It can be applied to all pages in an application by setting the <pages> e application configuration

At web server level - It define the <pages> element in machine.config file. This will apply the th web applications on that web server.

What is the difference between themes and CSS?


Posted by: Tripati_tutu

In case of CSS you can define only style properties but a theme can define multiple properties of a c style properties such as you can specify the graphics property for a control, template layout of a Gr etc.

The CSS supports cascading but themes does not support. The CSS cannot override the property valu a control but any property values defined in a theme, the theme property overrides the property value set on a control, unless you explicitly apply by using the StyleSheetThem

You can apply multiple style sheets to a single page but you cannot apply multiple themes to a sing one theme you can apply for a single page.

What is the difference between Synchronous and Asynchronous HTTP Handlers? Posted by: Tripati_tutu When you call for a HTTP request, unless until it finished the processing of assigned task, the S HTTP handler doesn't return any value. It will return a value after successful execution of sent

But in case of asynchronous handler, it will run a process independently and it will send a resp end user. When you are working with some lengthy application processes, then it is advisable to Asynchronous handler. Here the user doesn't need to wait until it finishes before receiving a re the server. How can you create your own custom HTTP handler factory class? Posted by: Tripati_tutu Yes, with the help of class by implementing the IHttpHandlerFactory interface, you can create custom HTTP handler factory class.

How to follow the best way to secure connection strings in an ASP.NET web application? Posted by: Tripati_tutu When you are working with ASP.NET applications, you should always store the connection st Web.config file. This is very secure. No user has rights to access web.config file from the brows Store the connection strings as encrypted format in the configuration file. Don't store the connection strings in .aspx page.

It is not recommended to set connection strings as declarative properties of the SqlDataSourc

some other data source controls.

What's the use of "Connecting to SQL Server using Integrated Security"? Posted by: Tripati_tutu This is best suited to use instead of using an explicit user name and password, which helps us to possibility of the connection string being compromised and your user ID and password being e

Why we are storing an XML file in the applications App_Data folder? Posted by: Tripati_tutu The use of storing an XML file in App_Data folder is not to return the contents of the App_Dat response to direct HTTP requests.

Write the steps to avoid Script Injection attacks? Posted by: Tripati_tutu Step-1: First encode the user input with the HtmlEncode methods so that the method will retur into its text representation.

Step-2: When you are using bound fields of a Data controls, then set the BoundField object's H property to true which causes the Data control to encode input given by the user when you are of that Data control.

What is an HTTP Handler? Posted by: Tripati_tutu This is a process which runs in response to a request made by an ASP.NET Web application. T referred to as endpoint. The ASP.NET page handler processes .aspx files. When a user request file, then the request is processed by the page through the page handler. It is also possible to cr HTTP handler that render custom output to the browser.

What is HTTP module? Posted by: Tripati_tutu These are the assemblies, and when you are sending any requests to your application then this will call. This is also a part of the ASP.NET request pipeline and has access to life-cycle events the request. HTTP modules are examining the incoming and outgoing requests and it takes act the request made by user. What is the interface that you have to implement to create a Custom HTTP Handler? Posted by: Tripati_tutu

Implement IHttpHandler interface to create a synchronous handler. Implement IHttpAsyncHandler to create an asynchronous handler.

What is the use of MaintainScrollPositionOnPostBack property? Posted by: Tripati_tutu When a page is posted back to the server, at that time the user is at top position of the page rat redirecting to that location where the user is before redirect of the webpage. So the use of MaintainScrollPositionOnPostBack property for a Page is to set the value as true or false for sc in the browser after the page is postback. When the property is set to true then the user will at at which the user is present before redirect. So we can say the user will redirect to the same pos redirect to another page. <asp:Page MaintainScrollPositionOnPostBack="True/False" />

In which way you can retrieve original request URL when using URL rewriting or Server.Tran ASP.NET? Posted by: Tripati_tutu The way to retrieve original request URL is Request.ServerVariables("HTTP_X_REWRITE_U will work on all types of URL rewriting methods like ISAPI filters, HTTP Handlers or Http Mo on Server.Transfer. Before any URI modifications, the original Request URI is saved into the H i.e. X-Rewrite-URL. This can also be retrieved in ASP.NET by using the above method.

What is difference between Common Type System and Type Safe? Posted by: Laghaterohan CTS define all of the basic types that can be used in the .NET Framework and the operations p those types.

Type safe means preventing programs from accessing memory outside the bounds of an object' properties. Type-safe code accesses only the memory locations which is authorized to access.

Can you programmatically store and retrieve data from ViewState? Posted by: Tripati_tutu Yes, you can programmatically store and retrieve data from ViewState in an ASP.NET applica Example: To save the value in ViewState object ViewState("Name") = txtName.text;

Retrieve the value from ViewState object String strName = ViewState("Name").ToString();

Is the ViewState of one page available to another page? Posted by: Tripati_tutu No, the ViewState of a Page is available only in that page. You cannot access ViewState of one p another page.

Can the HTML controls retain State across postbacks? If no, can you make HTML controls re across postbacks? Posted by: Tripati_tutu No, by default the HTML controls doesn't retain any state across postbacks. But yes, if you are HTML controls to Server Controls then you can retain HTML control State across postbacks. There are 2 ways to convert HTML control to Server Control. Right click on the HTML Control and then click "Run As Server Control" Set runat="server" attribute for the Control.

When a ViewState restoration happens and is it encoded? Posted by: Tripati_tutu The ViewState restoration happens during the Page_Init event. Yes, the ViewState is base-64 en

What are the three Register directive attributes used to add custom controls to a Web form? Posted by: Tripati_tutu TagPrefix: The TagPrefix defines a unique namespace for an user control. If multiple user con present on the page having same name, then they can be differentiated with them by using this determines the group that the user control belongs to.

Namespace: It is nothing but the project name and namespace within the custom control assem contains the controls to register. The .NET applications use the project name as an implicit nam controls present in the application.

Assembly: This defines the name of the created assembly (.dll) that contains the custom control control assembly is referenced by the Web application and it maintains a copy in the web appli directory. What are composite custom controls?

Posted by: Tripati_tutu Creating an extreme powerful control that is composite custom control which requires the com several server or HTML controls with in a single control class, and which can compiled with ot classes to create an assembly. That created assembly (.dll) contains custom control library. Afte you can load into Visual Studio .NET and can use as how you are using standard controls.

These controls are functionally similar to user controls, but they present in their own assemblie share the same control in different projects without copying the control. However its difficult t custom controls because you cant draw them visually with the help of Visual Studio .NET.

How a validation group works when the Page is posted? Posted by: Tripati_tutu When the page postbacks, then the IsValid property of Page class is set based on the validation present in the validationGroup. This group determines the caused validation occurred by the c example, if a button control with a validation group, let's say login group is clicked, then the Is property will return true if all validation controls whose ValidationGroup property is set to log valid.

Can a DropDownList fire validation controls? Posted by: Tripati_tutu Yes, a DropDownList control can fire validation control when the CausesValidation property o validation control is set to true and the AutoPostBack property is set to true.

Why SetFocusOnError property is used for a validation control? Posted by: Tripati_tutu With the help of this property, you can specify the focus whether that is automatically set to the specified by the ControlToValidate property or not or else by using the focus feature, the valid configured to set focus to their associated control to be validated when a validation error occur when the validation control unable to validate. It allows us to update the appropriate control p control property. It will always move focus back to the field with the error after you tab out an occurs.

What is InitialValue property of a RequiredFieldValidator? Posted by: Tripati_tutu This property assigns the starting value for a input control. The default value is String.Empty. validation control fails to validate, if the value of the associated input control is same as the Init upon focus. With the help of this control you can make the input control as a mandatory field.

How you can invoke programmatically all validation controls on a page? Posted by: Tripati_tutu You can invoke validation controls programmatically with the help of CallPage.Validate() meth properties invoke the validation logic for each validation control in the defined validation grou method is invoked, it does through the validation controls associated with the Page. Whats the difference between System.String and System.Text.StringBuilder classes? Posted by: Mahesh@emdsys.com System.String is immutable.

System.StringBuilder was designed with the purpose of having a mutable string where a variet operations can be performed.

What is a validation group and how do you create a validation group? Posted by: Tripati_tutu This is a group which allows you to combine different validation controls in a single group on a this, each validation group will going to perform its independent validation property as compar validation groups present on that page.

You can create a validation group by changing the ValidationGroup property to the same nam controls that you want to group. You can define a name to validation group, but you must have same name for all controls of the group.

How long the instance of a web form is available on the web server? Posted by: Tripati_tutu When we will request a webpage from the browser, it will create an instance of that requested W which generates HTML to response to the request, and posts it on the browser. After post, it de instance of that Webpage.

Lets say at client side the browser has an HTML, in that the user can enter some text in textbo select some required options, and perform other tasks until it fires any postback event, such as event. This causes the browser to send the submitted data back to the server for event processin server receives client request, it will create a new instance of the Webpage and it fills supplied d processes requested event by the client. As server finishes task, it posts the resulting HTML bac browser and destroys the instance of the Webpage. Explain the ways to format output of an ASP.NET Web application? Posted by: Tripati_tutu There are two different ways to format the output of an ASP.NET web application.

Cascading style sheets (CSS): This is used to control the appearance of elements on a Web form organizes all of the formatting information applied to HTML elements on a Web form which m adjust the look and feel of Web applications. These styles can set the size, font, color and behav specified HTML elements on the Web page.

Extensible Style sheet Language Transformations (XSLT): This is used to convert the mentione an Extensible Markup Language (XML) file to HTML output and shows that information on t form. This XSLT puts data into HTML element from the XML file and applies styles on that el

In which levels we can apply formatting to a web application? Posted by: Tripati_tutu You can define styles in a style sheet file and that can be applied to all webforms referencing t sheet.

You can also initialize styles in a pages head element and that can be applied to all elements o current page.

You can also define styles inline in the HTML tag. These styles are applicable only to the HTM in which these styles are defined. Write the advantages of storing style definitions in a style sheet file (.css)? Posted by: Tripati_tutu Easily you can maintain formatting i.e. when you will make change in style properties then it to the entire application.

The sets of parallel formatting rules can be maintained in separate style sheets for formatting according to the user requirement. For example, an application may provide standard, enlarge printer-friendly style sheets which can be select by the user at run time.

If you want to override the global styles then you should use page and inline styles. It depends inline styles which is difficult to maintain the formatting in a Web application.

What is the use of Style Builder and how you can modify a style sheet using style builder? Posted by: Tripati_tutu This is used to change the appearance of any styles in a style sheet. The changes to the style she change the appearance of Web form that references that style sheet. To modify a style sheet using style builder, you need to follow these steps:

First open the style sheet in Visual Studio which displays the style definitions in the Documen

and also in the Tool window.

Then select the style from Tool window to modify the definition of style property which will a the Document window.

When you will right click on the style definition, a menu will appear. From that menu when y Build Style it displays the Style Builder Wizard.

By using Style Builder you can compose the formatting which you want to add or modify in th style, and then click ok.

After completion of above steps, you will get new or modified style attributes to the style defin

Can you apply styles using class names and can you change it at run time? Posted by: Tripati_tutu Yes, you can apply style to different elements or different style to a single element in a class dep the elements used. With the help of element IDs, you can also apply style to the element on a W

Suppose you have created a style for a class, and then it automatically add a style definition to t sheet using .classname identifier.

You can apply style to HTML elements by using the class attribute and to server control eleme the CssClass attribute. Yes, we can change the style sheet at runtime. What are different application level events? Posted by: Tripati_tutu Application_Start: It occurs when the user visits a page within your Web application. Application_End: It occurs when there are no users of that application.

Application_BeginRequest: It occurs at the beginning of each request to the server. A request b a user navigates to some pages in the application. Application_EndRequest: It occurs at the end of each request to the server. Session_Start: It occurs when a new user visit a page within the application. Session_End: It occurs when a user stops requesting to the pages in Web application and their out. It specifies the period mentioned in Web.config file.

Application_Error: It occurs when there is an unhandled exception in application.

In which levels, the events can occur in an ASP.NET web application? Posted by: Tripati_tutu In a Web application, the events can occur at the application level, page level, and server contr

What is the difference between Application and Session Events? Posted by: Tripati_tutu By considering the application level you can have both Application and Session events. To initia and to make data available to all the current sessions of your Web application we can use Appl event. With the help of Session events you can initialize data that you want to share throughout individual sessions but not in between the sessions.

Explain steps to optimize a web application for better performance? Posted by: Tripati_tutu Step-1: Turn off the debug option for a compiled application that is code compiled with release faster than code compiled with debug option.

Step-2: Avoid postback of data between the client and server. Design the Web form in a way th complete the data on the Web form before user posts the data to the server. You can also use va control to know the data complete on the client side before the page is submitted.

Step-3: Turn on or off the Session state according to the requirement i.e. you are designing you some other techniques like cookies which is used to store client data etc.

Step-4: Make ViewState as off for server controls so that it needn't to retain their values. Savin information which leads to transmit data back to the server with each request. Step-5: Use stored procedures with databases to execute more quickly. Step-6: Use SqlDataReader rather than data set for data retrieval i.e. it is faster and consumes than a data set.

What is Optimization? Posted by: Tripati_tutu The Optimization is a structured, systematic process for accessing codes and usually refers to w in such a way so that it executes more quickly and consumes fewer resources. It simply reflects programming practices.

What are the three different types of Server Control Events? Posted by: Tripati_tutu The Server controls such as a Label, Button and Textbox each have their own sets of events tha response to the user requests. There are three types of server control events as mentioned below

Postback events: This event occurs when a Web page is sent back to the server for further proc These events effect on performance because they trigger a reverse back request to the server. A list can fire a post back if the AutoPostBack property of that dropdown list is set to true, else a will fire.

Cached events: The Cache events are saved in view state of a processed page when a postback e If the AutoPostBack property is set to false then the server controls can trigger a cached event.

Validation events: These events can be enabled in configuration level or in page level. These typ are handled on the page without any post back or caching. For security, this feature verifies tha to postback or callback events that originate from the server control.

What is ASP.NET Process recycling and how to configure it in machine.config file? Posted by: Tripati_tutu This technique helps you to configure the ASP.NET application, so that the application will aut shut down and restart after a given period of time requested by the user or by the client. Also i ability to repair them through process recycling. You can also handle how the ASP.NET proces recycled through attributes in the processModel element in the Machine.config file or else in we file.

To configure the process model you have to set some properties in machine.config file accordin requirement. <configuration> <system.web> <processModel enable="true" timeout="60" requestLimit="Infinite" username="machine" password="AutoGenerate" /> </system.web> </configuration>

Mention the different levels of events for Event Viewer? Posted by: Tripati_tutu There are 3 different levels of events for Event Viewer Informational events. Warning events. Error events.

Why it is required to monitor a deployed Web application? Posted by: Tripati_tutu When you have deployed a Web application, then you need to monitor that Web application be have to know how it performs on the server. Many issues can crop up for your application at th because of The number of users accessing that Web application. The changeable nature of user interaction. The possibility of malicious attack by the user. Write three major steps which involves in maintaining a deployed web application? Posted by: Tripati_tutu There are three major steps involved in maintaining a deployed web application: Monitoring the application for clearing errors, performance, and security issues. Make change in the application as issues are arising. Setup the application to respond to user traffic.

How do you run the Event Viewer to view application, system, and security events as they happ Posted by: Tripati_tutu For running of Event Viewer, lets choose the Event Viewer from the Administrative Tools sub Windows Start menu. (You can get the Administrative Tools menu in Windows XP Professiona click on Start button, then select Properties and click the customize button on the Start Menu t Administrative Tools option will appear on the Advanced tab of the customize Start Menu dial After that when you will click on the Event Viewer shortcut, and then the windows will display Viewer snap-in in the MMC (Microsoft Management Console).

How you can make change in deployed ASP.NET web application without restarting the server Posted by: Tripati_tutu Yes, after copying the new assembly files and the content files to the application folder, you can change in deployed web application on the server without restarting the server or IIS. It autom

restarts the application when you replace the assembly. You needn't to install or register the as the server.

List the different ProcessModel attributes which relates to process recycling in machine.config Posted by: Tripati_tutu Timeout attribute: It automatically recycles the process after a certain number of requests sent or we can say the amount of time before the process is shut down and restarted.

Shutdown Timeout attribute: It determines each process will take how much time to shut down time, the process is terminated by the system.

RequestLimit attribute: This attribute has the number of queued requests to serve before the p shut down and restarted. RestartQueueLimit attribute: This attribute specifies the number of queued requests to retain process is shut down and restarted.

MemoryLimit attribute: The percentage of physical memory the ASP.NET process is allowed t before that process is shut down and a new process is started. This helps to prevent memory lea causes a breakdown in the server.

ResponseRestart - DeadlockInterval: It specifies the amount of time to wait before restarting a because it was deadlocked. This helps to prevent applications with serious errors in the server.

ResponseDeadlockInterval: This is the time to wait before restarting a process that is a situatio no progress can be made.

Explain the ways, so that you can modify the additional permissions required by an application Posted by: Tripati_tutu There are 3 different ways to modify the additional permissions required by an application. Th

Permit the ASP.NET user access to the required files. To access this option, the server must h Windows NT file system (NTFS). Change the group of ASP.NET user. Use impersonation to run the process as another user.

In which 3 levels we have a configuration file for an ASP.NET web application? Posted by: Tripati_tutu Web server level: At this level the Machine.config file is located in Windows\Microsoft.NET\Framework\version\config directory. This helps to set the base config

all .NET assemblies that is running on the server.

Application or Web site level: At this level the Web.config file located in the IIS root directory. set the base configuration for all Web applications and overrides the settings that are in Machi file. In the sub directory of an application root folder: This override the settings in the root folders file. Write the steps to host a web application on a web server? Posted by: Tripati_tutu Step-1: Use IIS to set up a virtual folder for a physical folder in an application. Step-2: Copy all the web application to the virtual directory location. Step-3: Then add a shared .NET component to the servers global assembly cache (GAC). Step-4: Set the security permission on the server that allows the application to access required

What is Profile Based State in ASP State Management ? Posted by: Chvrsri A profile based state is nothing but the state changes is saved permanently for a particular pro means the state is saved manually by the user. If there was no saving done the Default settings w applied .

For Example . If we login into igoogle.com, there if we have our customized page set once, untill and unless we delibrately it will be the same page.

What are Shallow Copy and Deep Copy in .NET? Posted by: Tripati_tutu The terms "Shallow Copy " and "Deep Copy " which refer to the way the objects are copied, fo during the invocation of a copy constructor or assignment operator. The deep copy can also be member wise copy and the copy operation respects object semantics. For example, copying an o has a member of type standard string ensures that the corresponding standard string in the tar copy-constructed by the copy constructor of class string.

Shallow copy: This is nothing but creating a new object, and then copying the nonstatic fields o object to the new object. If a field is a value type then a bit-by-bit copy of the field is performed reference type then the reference is copied but not the referred object. Therefore, the original o

clone refer to the same object.

Deep copy: Deep copy is partially same as shallow copy, but the difference is deep copy copies t object and makes a different object, it means it do not refer to the original object while in case copy the target object always refer to the original object and changes in target object also make original object. It serializes the objects and deserializes the output.

What are the Difference between Compiler and Debugger? Posted by: Tripati_tutu Compiler is software or we can say it is a set of software that translates one computer Languag computer language. Most of the cases the High level Programming Language are converting to Programming Language.

Most of the time the Programs analyze and examine error, so for that Debugger is used. Debug another program that is used for testing and debugging of other programs. It is also able to tell error occurred in your application.

What is Debugger and what are the types of Debugger? Posted by: Tripati_tutu Debugger is a program that is used for testing and debugging purpose for the programs. Mainl to analyze and examine error conditions in the application. With the help of this we can able to the error occurred in your application. There are two types of Debugger that is:

CorDBG (command-line debugger) - To use this CorDbg, you must compile the original C# fi debug switch. DbgCLR (graphic debugger) - The Visual Studio .NET uses this DbgCLR debugger.

What is the difference between Cookie and Session in Asp.Net? Posted by: Tripati_tutu The basic and main difference between cookie and session is that cookies are stored in the use but sessions can't store in user's browser. This specifies which is best used for.

A cookie can keep all the information in the client's browser until deleted. If a person has a lo password, this can be set as a cookie in their browser so they do not have to re-login to your we time they visit. You can store almost anything in a browser cookie.

Sessions are not reliant on the user allowing a cookie. They work like a token in the browser w

allowing access and passing information while the user has opened his browser. The problem in when you close the browser the session will automatically lost. So, if you had a site requiring a couldn't be saved as a session but it can be saved as a cookie, and the user has to re-login every visit.

Define and describe different File Name Extensions in Asp.net? Posted by: Tripati_tutu Applications written in Asp .net have different files with different extension. Native files genera .aspx or .ascx extension. File name containing the business logic depend on the language that yo For Example c# files have extension aspx.cs. .asax: Default.asax, used for application-level logic .ascx: Web UserControls i.e. custom controls can be placed onto web pages. .ashx: for custom HTTP handlers.

.asmx: web service pages that are Code behind page of an asmx file is placed into the app_code

.axd: when enabled in web.config requesting trace.axd outputs application-level tracing. It is al special webresource.axd handler which allows control or component developers to package a co control complete with images, script, css etc. for deployment in a single file.

.config: web.config is the only file in a Web application. This is the by default extension (machin similarly affects the entire Web server and all applications on it). Also ASP.NET facilitates to c consume other config files. These are stored in XML format.

.cs/vb: Code files (cs indicates C#, vb indicates Visual Basic). Code behind files predominantly extension ".aspx.cs" or ".aspx.vb" for the two most common languages. Other code files can al the web folders with the cs/vb extension. These are placed inside the App_Code folder where th dynamically compiled and available to the whole application. .dbml: LINQ to SQL data classes file .master: Master page file

.resx: resource files for localization. Resource files can be global (e.g. messages) or "local" whic specific for a single aspx or ascx file. .sitemap: sitemap configuration files. The default file name is web.sitemap. .skin: theme skin files.

.svc: Windows Communication Foundation service file. Describe the different properties of cookie in Asp.Net? Posted by: Tripati_tutu The different properties of a cookie are:

Domain: This property defines the domain of Web servers to which this cookie should be mad When the Web server matches the defined domain then that web browser will send a cookie ba server. It specifies the domain for which the cookie is valid. The domain associated with the coo example, aspx.superexpert.com

Expires: It specifies the expiration date for a persistent cookie. It sets the current state of the c it gets and sets the expiration date and time for the cookies.

HasKeys: This is a Boolean value which indicates whether the cookie is a cookie dictionary or Name: The name of the cookie.

Path: It defines a Web server path to which the cookie should be made available. The path as the Cookie that is it sets the URI's to which the cookie applies. The default value is /.

Secure: A value that indicates whether the cookie should be sent over an encrypted connectio the Secure attribute of any SESSIONID cookies associated with the web application. It allows v true Sets Secure to true. false Sets Secure to false. dynamic The SESSIONID cookie inherits the Secure setting of the request that initiated the default value is False. Value: The value of the Cookie that is it sets the value for the cookie.

Values: It is a NameValueCollection that represents all the key and value pairs stored in a Co dictionary. Describe about HttpContext Class ? Posted by: Chvrsri HttpContext class: The HttpContext class encapsulates HTTP-specific information about an HTTP request.

This includes response/request headers, server variables, session variables, user information, Of particular interest is a property called Current, which returns an instance of the HttpConte represents the current HTTP request.

Another important property in the HttpContext class is User, which contains security informa the user who made the Web request. The User property returns a type the implements the IPri interface

Write the code which will create a cookie containing the user name DotnetFunda and the curre the user computer. Set the cookie as that remains on the user computer for 10 days? Posted by: Tripati_tutu HttpCookie cookieWebInfo = new HttpCookie("WebInfo"); CookieWebInfo["Name"] = "DotnetFunda"; // here CookieWebInfo is an object of class HttpCookie CookieWebInfo["Time"] = DateTime.Now.ToString(); cookieWebInfo.Expires = DateTime.Now.AddDays(10); Response.Cookies.Add(cookieWebInfo);

Here the HttpCookie class is under the System.Web namespace. Here 'Expires' sets the duratio cookie expires.

Describe the difference between Web and Window applications? Posted by: Tripati_tutu Web Forms: These are used for server controls, HTML controls, user controls, or custom contr created especially for the Web forms. Web applications are displayed in a browser only. These instantiated on the server; it sent to the browser and destroys immediately. These can run in an that machine supports browser.

Windows Forms: Windows applications can run on the same machine as they are displayed on machine. It displays their own windows and has more control over how those windows are goin These are instantiated and it exists for as long as needed and is destroyed.

What are Button HTML control and the Button Server control? What is the main difference b them?

Posted by: Tripati_tutu The Button HTML control is used to work as a control in forms, and it can also be used to perf anywhere on the form through scripts. It is used to display a button like push button. These bu a submit button or a command button.

The Button control allows you to create a push button on the Web Forms page. Here you can d add a Button web server control to a page by writing certain codes.

The Button HTML control triggers the event procedure defined in the button onclick event att runs at the client side. When clicked on the button, the Button server control triggers an ASP.N event procedure on the server that is written on the asp.net code behind page. What are the two different levels of variables that are supported by Asp.net? Posted by: Tripati_tutu There are two levels of variables supported in ASP.NET.

Page level variable: int, float, char, string and all other .net data type whose scope is limited to particular page only.

Object level variable: Application Level, Session Level that is used to access the data through application.

Explain what is the purpose of using EnableViewState property? Posted by: Tripati_tutu When a page is postback, then it allows the page to save the users input on a form. It also saves all the server side values as a hidden value on the page before sending that page t for a particular given control in the ViewState. When a page is posted back to the server, at the same time the server control is recreated with stored in ViewState. What are the different types of Caching in ASP.Net ? Posted by: Chvrsri Types of Caching Caching in ASP.NET can be of the following types Page Output Caching Page Fragment Caching Data Caching

What are the properties and methods of cache Class ? Posted by: Chvrsri Cahe Class ::

The Add/Insert method of the Cache class is used to add/insert an item into the cache. The Rem removes a specified item from the cache. The Cache class contains the following properties and Properties Count Item Methods Add Equals Get GetEnumerator GetHashCode GetType Insert Remove (Overloaded) ToString What is Application Pooling and what is its advantage ? Posted by: Chvrsri Application Pooling :: An Application Pool can contain one or more applications and allows us to configure a level of between different Web applications. For example, Advantage :

if you want to isolate all the Web applications running in the same computer, you can do this b separate application pool for every Web application and placing them in their corresponding a pool. Because each application pool runs in its own worker process, errors in one application pool wi the applications running in other application pools. Deploying applications in application pools advantage of running IIS 6.0 in worker process isolation mode because you can customize the a

pools to achieve the degree of application isolation that you need.

What is the default expiration period for Session and Cookies, and maximum size of ViewState Posted by: Tripati_tutu The default Expiration Period for a Session is 20 minutes. The default Expiration Period for a Cookie is 30 minutes. The maximum size of the viewstate is 25% of the page size.

Describe about Server Side State Management? Posted by: Tripati_tutu The Sever side state management technique provides better security and reduces bandwidth. B option is for storing page information that tends to have security than client side options, but th more web server resources which may lead to scalability issues when the size of the information

ASP.Net provides several options to implement Server Side State Management are explained b

Application State: This State information is available to all pages, regardless of which user req The Application State variables are the global variables for an ASP.NET application. The ASP provides application state via the HttpApplicationState class. You can also store your applicati values in application state, which is managed by the server.

Session State: The Session State information is available to all pages opened by a user during a This method stores the session specific information (that is values and objects in session state) w managed by the server and that is visible only within the session. This session state is available the HttpSessionState class. The Session State which identifies the requests from the same brow limited time and it provides the ability to persist variable values for the duration of that session

Profile properties: It allows you to store user specific data. Unlike session state, the profile data when a user's session expires. This allows you to manage the user information without requirin and maintaining your own database. It can be used in both multi-computer and multi-process configurations. This property provides a generic storage system that allows you to define and m kind of data while making the data available in a type-safe manner.

Database support: It is also used for database support to maintain the state on your web site. T basically with the help of cookies or session state. The Database Support to maintain state infor using a relational database for different reasons like security, personalization, consistency, and mining.

What are the advantages and disadvantages of using Session State? Posted by: Tripati_tutu The advantages of using session state are:

It is easy to implement and is just similar to using View State. Accessing of data is very fast as it stores session data in memory object of the current applicat It ensures platform scalability and it works in the multi-process configuration. Also it ensures data durability, since the session state retains data even if ASP.NET work proc (in outproc session). The disadvantages of using session state are:

As the session state data is stored in server memory, it is not advisable to use session state whe working with large sum of data. With the use of Session state, it will affect the performance of memory, because session state v in memory until you destroy the state. If the worker Process or application domain recycles all session data will be lost. We can't use it in web Garden scenarios and is not suitable for web farm scenarios also. Explain what are the different Session State Modes that supports ASP.NET? Posted by: Tripati_tutu ASP.NET supports three Session State modes. Those are

InProc: This mode is faster among all the storage modes and it stores the session data in the AS worker process. It also effects on performance of data if the amount of data to be stored is larg

StateServer: This mode is basically for serialization and de-serialization of objects. State Serve slower than InProc mode as it stores data in an external process. State Server mode is maintain different systems and the session state is serialized and stored in memory in a separate process.

SQLServer: Basically this mode can be used in the web form which secures the session state an reliable for the storage of a session state. In this storage mode, the Session data is serialized and database table in the SQL Server database.

In which way you identify a Master Page and how you can bind a Content Page to a Master Pa master page be nested? Posted by: Tripati_tutu The master page is identified by @Master directive and that replaces the @Page directive whic ordinary .aspx or content page pages.

The MasterPageFile attribute of a content page's @Page directive is used to bind a Content Pa

Master Page. Yes, the master pages can be nested.

How can you dynamically assign a Master Page? Posted by: Tripati_tutu You can assign a master page dynamically in the PreInit event of the content page by using the MasterPageFile property. Below is the code snippet to assign a master page dynamically. void Page_PreInit(Object sender, EventArgs e) { this.MasterPageFile = "MasterPage.master"; } Explain what are the different ways to globalize the web applications? Posted by: Tripati_tutu There are three different ways to globalize the web applications:

Detect and redirect approach: In this approach the applications have lots of text file content wh translation and few are some executable components. In this we can create a separate Web app each supported culture present in that application and then identify the users culture and then request to the appropriate application.

Run-time adjustment approach: This approach is best for that kind of applications where limit of content are present. For this kind of approach we can create a single Web application that d users culture and that adjusts output at run time using format specifiers and other tools.

Satellite assemblies approach: With this approach we create a single Web application which sto dependent strings in resource files and that are compiled into satellite assemblies. It identifies t culture and load strings from the appropriate assembly at run time. This approach is best for a which generates content at run time or that have large executable components. What's the advantage of using Windows authentication in a Web application? Posted by: Tripati_tutu The advantage of using Windows authentication in a Web Application is:

Web application can use the same security that applies to your windows application which wi authenticate to your window like user names, passwords, and permissions.

To access the Web application, users logged on to the network. It is important that user doesn again because when window is opened then it will automatically authenticate the user to use we application.

How will you get a User Identity in an application? Posted by: Tripati_tutu With the help of User objects Identity property you can be able to get User Identity. The Ident which returns an object that includes the user name and the role information. Sample Code Snippet: public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Label1.Text = User.Identity.IsAuthenticated.ToString(); Label2.Text = User.Identity.Name; Label3.Text = User.Identity.AuthenticationType; } }

What is the difference between ReadOnly and Const? Posted by: Tripati_tutu ReadOnly: A ReadOnly field can be initialized either at the declaration time or in the construc ReadOnly fields can have different values depending on the constructor used. The ReadOnly fi used for run time constants. It marks the field as unchangeable but the property can be change constructor of the class.

Const: A Const field can only be initialized at the declaration of the field. The Const fields can compile time constants and it cant change at run time. In a program where ever we are using C

that value will be replaced by the compiler. Code Snippet: namespace ClassLibrary { public class Test { public const int ConstValue = 10; public static readonly int ReadonlyValue = 20; } }

By looking to the above code snippet, we can say ConstValue is declared as literal and it has an assigned to it whereas ReadonlyValue is declared as initonly and it has not been assigned any v So we can say that if a type is declared as Const, its value is known as compile time, but when t is declared as static readonly field, that cannot be known at compile time.

What is the meaning of neutral cultures in ASP.NET? Posted by: Tripati_tutu A neutral culture is a culture which represents general languages like English or Spanish and a language and region. The ASP.NET application which assigns that culture to all the threads ru that Web application and those Threads are the basic units where the server allocates the proce When user set culture attribute for a Web application in Web.config, then it will maintain mult for a Web application within the aspnet_wp.exe worker process.

What is using statement versus using directive? Posted by: Tripati_tutu You can create an instance in a using statement to ensure that Dispose is called on the object w using statement is closed or else we can say Using automatically calls the stream objects Dispo when the Using statement is closed. A using statement can be exited either when the end of the statement is reached or if an exception is thrown and control leaves the statement block before the statement.

The using directive has two uses: Create an alias for a namespace (a using alias). Permit the use of types in a namespace, such that, you do not have to qualify the use of a type namespace (a using directive). Describe the Managed Execution Process? Posted by: Tripati_tutu It includes the following steps that are as follows:

First you choose a compiler. To get the benefits provided by the common language runtime, y one or more language compilers that target the runtime. You can compile your code to Microsoft intermediate language (MSIL) and when compiling, your source code into MSIL and generates the required metadata.

When you are compiling the code from MSIL to native code, then at that execution time, a jus (JIT) compiler translates the MSIL into native code. During this compilation, code passes a ver process which examines the MSIL and metadata to find out whether the code can be determine safe or not.

Executing your code. The common language runtime provides the platform that enables execu place as well as a different type of services that can be used during execution.

What is Active Directory? Explain the steps to configure ActiveDirectoryMembershipProvider Posted by: Tripati_tutu It is a programmatic interface for Microsoft Windows directory. It enables your applications to with diverse directories on a network, using a single interface. Visual Studio .NET and the .NE Framework that makes it easy to add ADSI functionality with the DirectoryEntry and Director components. Using this, you can create applications that perform common administrative tasks backing up databases, accessing printers, and administering user accounts etc.

The ActiveDirectoryMembershipProvider is a membership provider that is included in ASP.NE Framework. You can use this provider to store the user information in Active Directory or AD Directory Application Mode). This is a light weight version of Active Directory. If you want to ASP.NET membership with ADAM, then you need to follow these steps:

Create an ADAM instance and create the required classes. Configure your application to use the ActiveDirectoryMembershipProvider and connect to th instance.

For more details, read http://msdn.microsoft.com/en-us/library/hsxk2787(VS.71).aspx

What is Access Control Lists? How to add a rule to the Access Control List? Posted by: Tripati_tutu These are the way resources such as directories and files are secured in the NTFS file system w commonly used file system in all windows. You can also view this file by selecting the security t files properties dialog. To get this security tab follow the steps that is mentioned below... Step-1: Create a text file. Step-2: Right click on that file and click on properties. Now you will get that security tab. Code snippet to add a rule to the Access Control Li st: System.Security.AccessControl.FileSecurity sec = System.IO.File.GetAccessControl (Server.MapPath(Test.txt));

sec.AddAccessRule (new System.Security.AccessControl.FileSystemAccessRule ( @WIN7\TestUser, System.Security.AccessControl.FileSystemRights.FullControl, System.Security.AccessControl.AccessControlType.Allow ) );

System.IO.File.SetAccessControl (Server.MapPath (Test.txt), sec); What are different classes that are present in .Net framework? Posted by: Tripati_tutu Below are few classes that are present in .Net framework...

A) File class- It enables you to represent a file on your hard drive. You can use the file class to c

whether a file exist or not, create a new file, delete a file, and also can perform many other file r tasks.

B) Graphics class- It enables you to work with different types of images such as GIF, PNG, BM images. You can use the Graphics class to draw rectangles, arcs, ellipse and other elements on a C) Random class- It enables you to generate a random number. D) SmtpClient class- It enables you to send email. You can use SmtpClient class to send emails attachments and HTML content.

These are only four examples of classes in the framework. The .Net framework contains almost classes that you can use when building applications.

How do you implement the custom output caching? Posted by: Tripati_tutu Create a custom output-cache provider as a class that derives from the new System.Web.Caching.OutputCacheProvider type. You can then configure the provider in the W file by using the new providers subsection of the outputCache element, as shown below: <caching> <outputCache defaultProvider="AspNetInternalProvider"> <providers> <add name="DiskCache"

type="Test.OutputCacheEx.DiskOutputCacheProvider, DiskCacheProvider"/> </providers> </outputCache> </caching> Then specify the newly created and configured custom cache provider as below:

<%@ OutputCache Duration="60" VaryByParam="None" providerName="DiskCache" %>

How do you implement ViewState for a control in ASP.Net 4.0? Posted by: Tripati_tutu In ASP.NET 4.0, Web server controls include a ViewStateMode property that lets you disable v default and then enable it only for the controls that require it in the page. The ViewStateMode property takes an enumeration that has three values: Enabled, Disabled, and Inherit. Enabled enables view state for that control and for any child controls that are set to Inherit or nothing set. Disabled disables view state, and Inherit specifies that the control uses the ViewStateMode setting from the parent control. <asp:PlaceHolder ID="PlaceHolder1" runat="server" ViewStateMode="Disabled"> Disabled: <asp:Label ID="label1" runat="server" Text="[DeclaredValue]" /><br /> <asp:PlaceHolder ID="PlaceHolder2" runat="server" ViewStateMode="Enabled"> Enabled: <asp:Label ID="label2" runat="server" Text="[DeclaredValue]" /> </asp:PlaceHolder> </asp:PlaceHolder>

What is View Control? How it relates ActiveViewChanged? Posted by: Tripati_tutu The View Control is the part of the MultiView control and it does not support any special prop methods. Its primary purpose is to act as a container for other controls. However, the view con support the following two events: Activate- It raises when the view becomes the selected view in the MultiView control. Deactivate- It raises when another view becomes the selected view in the MultiView control. The multiview control which supports this event. This event is raised when a new view control What a Wizard control can contain? Posted by: Tripati_tutu

A Wizard control contains one or more WizardStep controls that represent steps in the wizard WizardStep control supports the following properties:

AllowReturn- It enables you to prevent or allow a user to return to this step from a future step Name- It enables you to return the name of the WizardStep control.

StepType- It enables you to get or set the type of wizard step. In this the possible values are Au Complete, Finish, Start, and Step.

Title- It enables you to get or set the title of the WizardStep. The title is displayed in the wizard Wizard- It enables you to retrieve the Wizard control containing the WizardStep. The WizardStep also supports the following two events: Activate- Raised when a WizardStep becomes active. Deactivate- Raised when another WizardStep becomes active.

How will you specify what version of the framework your application is targeting? Posted by: Tripati_tutu In Asp.Net 4.0 a new element "targetFramework" of compilation tag (in Web.config file) lets y the framework version in the web.config file as <?xml version="1.0"?> <configuration> <system.web> <compilation targetFramework="4.0" /> </system.web> </configuration> It only lets you target the .NET Framework 4.0 and later versions. What is App_Data Folder?

Posted by: Tripati_tutu The App_Data folder holds the data stores utilized by the application. The App_Data folder ca Microsoft SQL Express file (.mdf files), Microsoft Access files (.mdb files), XML files and any o want to keep.

What are the different ASP.Net controls? Posted by: Tripati_tutu The ASP.Net framework contains over 70 controls. These controls can be divided into 7 groups

1) Standard Controls: The standard controls enables you to render standard form elements suc buttons, input fields and labels.

2) Validation Controls: The validation controls enable you to validate form data before you sub to the server. For example, you can use a RequiredFieldValidator control to check whether a u value for a required input field.

3) Rich Controls: The Rich controls enable you to render things such as calendars, file upload b rotating banner advertisements and multi-step wizards.

4) Data Controls: The data controls enable you to work with data such as database data. For ex can use these controls to submit new records to a database table or display a list of database re

5) Navigation Controls: The navigation controls enable you to display standard navigation elem menus, tree views, and bread crumb trails.

6) Login Controls: The login controls enable you to display login, change password, and registr

7) HTML Controls: The HTML controls enable you to convert any HTML tag into a server-sid

What are the different types of server controls present in ASP.Net? When you will use them? Posted by: Tripati_tutu ASP.Net provides two distinct types of server controls i.e. HTML server controls and Web serv HTML Server: When converting traditional ASP 3.0 web pages to ASP.Net web pages. When you want to explicitly control the code that is generated for the browser.

Web Server: When you require a richer set of functionality to perform complicated page requi When you are developing web pages that will be viewed by a multitude of browser types and th different code based upon these types. Explain about the readystate property in ASP.NET?

Posted by: Tripati_tutu Readystate property is a property that can hold the responses of the server to the query that is from the client side. Each time when the readystate property changes, then the onreadystatecha function will be executed. Some of the values for the readystate property are as below... If the status is zero the request is not initialized If the status is one the request has been set up If the status is two the request has been sent If the status is three the request is in process If the status is four the request is complete. What are new things with ASP.Net 4 WebForms? Posted by: Tripati_tutu Some of the Features are: Ability to set Metatags. More control over viewstate. Added and Updated browser definition files. ASP.Net Routing. The ability to Persist Selected rows in data Control. More control over rendered HTML in FormView and ListView Controls. Filtering Support for datasource Controls.

What is RedirectPermanent in ASP.Net 4.0? Posted by: Tripati_tutu In earlier Versions of .Net, Response.Redirect was used, which issues an HTTP 302 Found or te redirect response to the browser (meaning that asked resource is temporarily moved to other lo which inturn results in an extra HTTP round trip. ASP.NET 4.0 however, adds a new Redirect that Performs a permanent redirection from the requested URL to the specified URL. and retu Moved Permanently responses. E.g . RedirectPermanent("/newpath/foroldcontent.aspx");

A theme can contain how many Default and Named skin for each control ? Posted by: Santosh.impossible A theme can contain only one Default Skin for each type of control. However, a theme can cont

Named skins as you please. Each Named Skin must have a unique name. Please find the below sample code:

TextBox.Skin: <asp:TextBox SkinID="DashedTextBox" BorderStyle="Dashed" BorderWidth="5px" runat= <asp:TextBox BorderStyle="Double" BorderWidth="5px" runat="server"/>

ShowNamedSkin: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowNamedSkin.aspx. Inherits="TracingDemo.ShowNamedSkin" Theme="SimpleTheme" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Show Named Skin</title> </head> <body> <form id="form1" runat="server"> <div> <asp:TextBox ID="txtFirstName" runat="server" SkinID="DashedTextBox"></asp:TextBox <br /> <br /> <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox> </div> </form> </body> </html>

What is the difference between web service and remoting? Posted by: Tripati_tutu Web services may be accessed using HTTP only. Remoting objects may be accessed over any TCP, SMTP and HTTP etc. Web services are stateless whereas Remoting supports for both stateless and with state enviro which is achieved using singleton and singlecall activation. ASP.Net provides good support to create web services. They are easy to deploy. In compariso is little bit complex. Web services may be considered very reliable due to the fact that they are hosted on IIS. But if IIS is not used then methods like plumbing have to be used to ensure the application reliabili Using Web services only a limited number of types may be serialized (XML). Using Remoting SOAP object, Binary objects and XML objects may be serialized.

In .Net when we create an application that consumes a web service, the web service may or m built using .Net. But while implementing Remoting in .Net both the applications must be built i

What is the use of @Page Directive? Posted by: Vpramodg @Page Directive is used to specify attributes that affect the page in the .aspx page (content pag <%@Page Language=C# Debug=true %> <%@ Page attribute="value" [attribute="value"...] %> Eg: MasterPageFile Theme Title Trace

What is DataPager control, describe it? Posted by: Tripati_tutu The DataPager serves as an external control to provide paging features. The DataPager class is page data and to display navigation controls for data-bound controls that implements the IPageableItemContainer interface and also associates the DataPager control with the data boun provides a navigation bar on top or on bottom of the page (or both) to navigate to other pages a the user's requirement. Below there is a description about different page field types.

NextPreviousPagerField -Enables users to navigate through pages one page at a time, or to jum or last page. NumericPagerField - Enables users to select a page by page number. TemplatePagerField - Enables you to create a custom paging UI. Below is the sample code to create a datapager:

<asp: datapager PageSize="10" ID="DataPager1" runat="server" PagedControlID="ListVie <fields> <asp:nextpreviouspagerfield ButtonType="Link" ShowPreviousPageButton="True" ShowNextPageButton="False"/>

<asp:numericpagerfield /> <asp:nextpreviouspagerfield ButtonType="Link" ShowPreviousPageButton="False" ShowNextPageButton="True" /> </fields> </asp:datapager>

Explain briefly what is DataList control? Posted by: Tripati_tutu The DataList control is a data bound list control that displays items using templates. The DataL supports selecting and editing of data. The contents of the DataList control can be manipulated templates. It acts as a container of repeated data items. DataList and GridView Web controls c child controls that raise events. Therefore, a DataList control may have a child control as part that raises an event. The child control event is "bubbled up (sent up) to the control's container container control raises an event called RowCommand with parameter values. These values all determine which control raised the original event. One is then able to respond to this event. Alt one can write individual event handlers for the child controls.

Using the DataSourceID property, binding to data source controls, such as SqlDataSource, ObjectDataSource, and XmlDataSource, is supported Using the DataSource property, binding to an object that implements the System.Collections. interface is supported DataList supports selecting and editing. Typically, the Repeater is mostly used for displaying records. However, because of event bubbling, one is able to implement more advanced behavio Repeater control. The display direction of a DataList control can be vertical or horizontal. The layout of the DataList control is controlled with the RepeatLayout property.

List of templates available in DataList: AlternatingItemTemplate - Works in conjunction with the ItemTemplate to provide a layout fo rows with in the layout.

EditItemTemplate - Allows for a row or item to be defined on how it looks and behaves when e FooterTemplate - Allows the last item in the template to be defined. HeaderTemplate - Allows the first item in the template to be defined. ItemTemplate - This is used to define a row or layout for each item in the display.

SelectedItemTemplate - It allows for a row or item to be defined on how it looks and behaves w selected. SeparatorTemplate - This template is used between the items in the template. Below there is a sample code to create DataList control. <asp:DataList ID=" dlMyCountry" runat="server"> <ItemTemplate>

<asp:Label ID="Label1" runat="server" Text='<%# Eval("Country_Code") %>'></asp:Labe

<asp:Label ID="Label2" runat="server" Text='<%# Eval("Country_Name") %>'></asp:Lab </ItemTemplate> </asp:DataList>

private void BindGrid() { string sql = "Select * from Country Order By Country_Name"; SqlDataAdapter da = new SqlDataAdapter(sql, Yourconnectionstring); DataTable dt = new DataTable(); da.Fill(dt);

dlMyCountry.DataSource = dt; dlMyCountry.DataBind(); }

protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindGrid(); } }

What is hidden field control? Posted by: Tripati_tutu Hidden fields technique is widely used in ASP.NET programming. This control enables a devel a non-displayed value in the rendered HTML of the page. The HiddenField control is used to s that needs to be persisted across multiple postbacks to the server. Hidden fields are html input hidden type that store hidden data in the html. An example for a hidden field can look like this Page as: <asp:HiddenField ID="MyHiddenField" runat="server" Value=Hidden field value/>

It will be hidden to the user that means you can store some value but user cannot able to see th webpage. But you should not keep any sensitive information in hidden field because it is availab webpage, but user cannot see it directly. You can see the hidden field value by right click on a w go to "View Source". There you can see the hidden field value along with html tag available in so it is not secure. What are GridView and ListView in ASP.NET? Posted by: Tripati_tutu Grid View:

The grid view control is a powerful data grid control that allows you to display an entire collect and sorting, and paging, and perform inline editing.

DataGrid requires you to write custom code for handling common operations like sorting, pa manipulation of data in DataGrid.

DataGrid when bound to DataSource control can only support select operation on DataSourc DataSource through DataGrid can be done only through custom ADO.NET code. DataGrid supports a restricted event model. DataGrid does not support adaptive rendering on different platforms. Features of Grid View:

Enhanced data source binding capabilities (Direct interaction with DataSource without any A code) Built-in support for sorting and paging functionality Improved Design time features(Smart Panel Tag) Customized pager user interface with Pager Template property Additional Column types(Image Field) New Event model which support for pre-event and post-event operations List View:

ListView is a new databound control. ListView control is similar to GridView, Repeater, and D which helps us to display a table of data with some additional features. The list view control is b advanced ListBox control which allows you to add rows of data, but it also supports large and s multiple columns, automatic label edit, column re-order, hot-tracking. ListView control can be control between GridView and Repeater control. ListView control gives us more control on the HTML output with edit/update/delete feature. Also, ListView control has a built in support for row, sorting, etc. The four main modes of ListView control are:

Icon - Displays items with large icons and your main text Small Icon - Displays items with small icons and your main text List - Displays items with your main text Detail - Displays items with small icons, your main text, and any other data to be displayed in c much more... Features of List View: Can define its own template/Layout/Structure for the data display. Edit/Update/Delete capabilities on the data displayed. Built-in support for inserting new row. Built-in support for sorting Supports databinding via DataSource Controls including LINQ DataSource controls.

How do you begin and end secure communication via SSL? Posted by: Tripati_tutu To begin secure communication, specify https in an address. For example: <a href="https://www.dotnetfunda.com/home.aspx">Secure page. </a> To end secure communication, specify http as, For example: <a href="http://www.dotnetfunda.com/welcome.aspx">Not secure. </a>

What is the role of the ASP.NET worker process? What is aspnet_wp.exe? Posted by: Tripati_tutu For faster execution of ASP.NET applications that are primarily based to be hosted on IIS serv aspnet_wp.exe comes into picture. This file (aspnet_wp.exe) is actually the ASP.NET worker pr worker process is introduced to actually share the load on the IIS, so that application domains services may be maintained by a single worker process.

The aspnet_wp.exe worker process is a part of the Microsoft ASP.NET framework and it is res most of the technical processes in the ASP.NET framework. There may be multiple instances o worker process running on IIS 6 depending on multiple application pools. The worker process the requests passed to the ASP.NET framework, so we can say that its actually the main engin handles all requests pertaining to ASP.NET. For example, when a request for an .aspx page is r the IIS server, the dll called aspnet_isapi.dll passes this request to the aspnet_wp.exe worker pr

What is DataSet and DataView? Posted by: Vpramodg DataSet- is an object used to store the data retrieved from the database. It can contain one or m tables .Each table in the dataset is known as Datatable. The constraints supported by the datata 1)UniqueConstraint. 2)ForeignKeyConstraint.

DataView - is used for the customized view of data of datatable, with the help of dataview we ca searched or sort the data.

Explain Form level validation and Field level Validation? Posted by: Tripati_tutu Form level validation is the validation step that is done after the filling up of the form is done. I when the user submits the forms.

Field level validation provides immediate validation of the input given by the user. The events a with field level validation are KeyDown, KeyPress, textchange, etc.

Explain how to configure Trace switches in the application's .config file? Give the code snippet file. Posted by: Tripati_tutu Switches are configured using .config file. Trace switches can be configured and the trace outpu enabled or disabled in an application with the help of .config file. Configuring involves changin of the switch from an external source after being initialized. The values of the switch objects ca changed using the .config file. TraceSwitch offers five levels of tracing from 0 to 4 i.e. it expose the following properties. TraceOff TraceError TraceWarning TraceInfo TraceVerbose

This class provides support for multiple levels instead of the simple on/off control offered by th BooleanSwitch class. Off - 0 Outputs no messages to Trace Listeners. Error - 1 Outputs only error messages to Trace Listeners. Warning - 2 Outputs error and warning messages to Trace Listeners. Info - 3 Outputs informational, warning and error messages to Trace Listeners. Verbose - 4 Outputs all messages to Trace Listeners. Code Snippet of config file: <configuration> <system.diagnostics> <switches>

<add name=LevelSwitch value=3 /> </switches> </system.diagnostics> </configuration> To construct a TraceSwitch: TraceSwitch tSwitch=new TraceSwitch (LevelSwitch, Trace Levels); System.Diagnostics.Trace.WriteIf (tSwitch.TraceInfo, The Switch is 3 or more!);

Here the TraceSwitch class returns true if the switch is at the same level or at the higher level t propertys value. Here the TraceInfo property will return true if the switch value is set to 3 or m What are the different ways to handle exceptions in ASP.NET? Explain them briefly? Posted by: Tripati_tutu There are three different ways to handle exceptions in ASP.NET. These are

a) Try/catch/finally block: You can enclose your codes in Try/Catch/Finally block. You can cat exceptions in the catch block. The third part of this block is finally. It is executed irrespective o that an exception has been raised.

b) Using Events like Page_Error and Application_Error: Page_Error: This is page event and is raised when any unhandled exception occur in the page Application_Error: This is application event and is raised for all unhandled exceptions in the application and is implemented in global.asax

c) Using Custom error page: The <customErrors> section in web.config has two attributes that error page is shown: defaultRedirect and mode. The defaultRedirect attribute is optional. If pr specifies the URL of the custom error page and indicates that the custom error page is shown in Runtime Error. The mode attribute is required and accepts three values: On, Off, and Remote values have the following behavior: On - indicates that the custom error page or the Runtime Error is shown to all visitors, regardl whether they are local or remote. Off - specifies that the Exception Detail is displayed to all visitors, regardless of whether they a remote. RemoteOnly - indicates that the custom error page or the Runtime Error that is shown to remo

while the Exception Detail is shown to local visitors.

Explain the points that differentiate between login controls and Forms authentication? Posted by: Tripati_tutu Forms authentication can be easily implemented using login controls without writing any cod Login controls can perform different functions like prompting for user credentials, validating issuing authentication just as the Forms Authentication class. The Forms Authentication class is used in the background for the authentication ticket and A membership is used to validate the user credentials. Login controls provides form authentication. If we implement authentication through Forms Authentication then we do it through code. On the other hand, login controls allows the easy implementation on the basis of Forms Authentication without writing any code. The class used controls are also Forms Authentication class. So instead of creating your own set of user creden validations and issuing of authentication ticket, it is simpler to use a normal login control.

What is Session Identifier? Posted by: Tripati_tutu Session Identifier is used to identify session. It has SessionId property. When a page is requeste sends a cookie with a session identifier. This identifier is used by the web server to determine if an existing session or not. If not, a Session ID (120 - bit string) is generated by the web server a along with the response. What are the advantages and disadvantages of using Outproc Session State? Posted by: Tripati_tutu The advantages of using session state are:

It ensures data durability, since session state retains data even if ASP.NET work process resta It works in multi-process configuration, thus ensures platform scalability. The disadvantages of using session state are:

Since data in session state is stored in server memory, it is not advisable to use session state w with large amount of data. Session state variable stays in memory until you destroy it, so too many variables in the memo effects on the performance of the session state.

How do you provide secured communication in ASP.NET? Posted by: Tripati_tutu ASP.NET provides secured communication using Secure Sockets Layer. To use this SSL applic

need to have an encryption key called a server certificate configured in IIS.

When a user requests a secured page, the server generates an encryption key for the users sess encrypted response is then sent along with encryption key generated. In the client side, the resp decrypted using same encryption key. How do we implement ASP.NET Globalization? Posted by: Tripati_tutu Create a resource file and compile them into a binary resource file. Create satellite assembly for each of the resource file for each culture. Store them in separate folder for easy access and replacement. Read the resources from the satellite assembly that is stored in different folders based on the culture.

Define Error Events? Posted by: Tripati_tutu ASP.NET supports events. When any unhandled exception occurs in an application, an event o events are called as Error Events.

ASP.NET is having two events to handle exceptions. Page_Error: This is page event and is raised when any unhandled exception occur in the page Application_Error: This is application event and is raised for all unhandled exceptions in the application and is implemented in global.asax

The Error events have two methods to handle the exception: GetLastError: Returns the last exception that occurred on the server. ClearError: This method clear error and thus stop the error to trigger subsequent error even Why the exception handling is important for an application? Posted by: Tripati_tutu Exception handling is used to prevent application from unusual errors occurrences at the time If the exceptions are handled properly, the application will never get terminated abruptly. What is Shared (static) member? Posted by: Tripati_tutu # It belongs to the type but not to any instance of a type. # It can be accessed without creating an instance of the type. # It can be accessed using the type name instead of the instance name. # It can't refer to any instance data.

Explain the aim of using EnableViewState property? Posted by: Tripati_tutu It allows the page to save the users input on a form across postbacks. It saves all the server side given control into ViewState, which is stored as a hidden value on the page before sending the p clients browser. When the page is posted back to the server, the server control is recreated with stored in viewstate. What are the different types of Session state managements available with in ASP.NET? Posted by: Tripati_tutu ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server.

Out-of-Process Session state management stores data in an external data source. The external d 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.

What are resource files and explain the steps to generate a resource file? Posted by: Tripati_tutu The resource files are those files which are in XML format. They contain all the resources need application. These files can be used to store string, bitmaps, icons, fonts etc. Steps to generate a resource file: a. Open the web page in the design view. b. Click Tools c. Select generate local resource d. .resx file generated in the solution explorer e. Type in the resources. The file contains the key and value pairs. f. Save the file. What is Absolute and Sliding expiration in .NET? Posted by: Tripati_tutu These two are Time based expiration strategies.

Absolute Expiration: In this case the Cache expires at a fixed specified date or time. E.g.: Cache. Insert ("ABC", ds, null, DateTime.Now.AddMinutes (1), Cache.NoSlidingExpirat The cache is set to expire exactly two minutes after the user has retrieved the data.

Sliding Expiration: The cache duration increases by the specified sliding expiration value every page is requested. E.g.: Cache.Insert ("ABC", ds, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes (1 Here ds stands for Dataset.

What is Cache Callback in Cache? Posted by: Tripati_tutu The cache object has dependencies e.g. it stores relationships to the file. Cache items remove th when these dependencies change. For this we would need to simply execute a callback method w items are removed from the cache to add the items back in cache.

E.g.: We have a string variable string var="hello" and store it in cache. This item would be rem the cache if value is changed from "hello" to "bye". In such a case we need to simply write a ca function which would add updated var back in cache as its been removed as a result of its dep changing. Is it possible to apply theme to a Master page? Posted by: Santosh.impossible With reference to the following link: http://msdn.microsoft.com/en-us/library/wtxbf3hh.aspx

If we add the theme attribute to the @ Master directive, the page will raise an error when it ru But we can apply themes by using the following approaches:-

1. As master pages is placeholder/templated and it is merged with the content page very early i execution life-cycle. The theme that is applied to the the content pageis applied to the master pa

2. If the site as a whole is configured to use a theme by including a theme definition in the pages Hence there is no theme attribute in the @Master directive. What are the validation controls available in asp.net? Posted by: Vpramodg 1.RequiredFieldValidator - Helps in ensuring that a value has been entered for a field.

2.CompareValidator - Checks if the value of a control matches the value of another controls or 3.RangeValidator - Checks if the value entered in a control is in specified range of values.

4.RegularExpressionValidator - Checks if the value entered matches the regular expression tha

5.CustomValidator - The value entered is checked by a client-side or server side function create

6.ValidationSummary - A List of all validation errors occurring in all the controls is created an displayed on the page. What are the two levels of variable supported by Asp.net? Posted by: Vpramodg 1.Page -Level Variables eg:-String,int,float. 2.Object-Level Variables eg:-Application Level,Session Level Difference between Session object and Profile object in ASP.NET? Posted by: Peermohamedmydeen Profile 1.Profile object is persistent. 2.Profile object uses the provider model to store information. 3. Profile object is strongly typed. 4. Mostly used for anonymous users. Session 1.Session object is non-persistant. 2.Session object uses the In Proc, Out Of Process or SQL Server Mode to store information. 3. Session object is not strongly typed. 4. Used for authenticated users.

How many tables can we store in the dataset? Posted by: Shankul2784 There is no limit for the storing of tables in the dataset. We can use many tables in a single data What is the maximum size of viewstate? Posted by: Shankul2784 The maximum size of the viewstate is 25% of the page size.

What is the maximum Number of Tables Stored in Dataset? Posted by: Shankul2784 The maximum size is limited by Int32. So 2^32 is the maximum number of DataTables you can a DataSet. So the max size is 2 billion.

Who calls the validation controls? Posted by: Shankul2784 In ASP.NET 1.0 it was handled by webuivalidation.js script file. The scripts are now included i straight from the DLL. This is done through the special handler (/WebResource.axd), so you ca javascript files. If there is master page attached to the aspx page then which page load event will fire first? Posted by: Shankul2784 NOTE: This is objective type question, Please click question title for correct answer.

If there are 5 rows in the datatable & it is bound to the gridview then how many times item_bo will run? Posted by: Shankul2784 for 7 times. 5 for the items, 1 for header & 1 for footer.

If there is one apllication, containing 10 folders, then how many maximum web.config can cont application? Posted by: Shankul2784 NOTE: This is objective type question, Please click question title for correct answer.

Can we put web.config in sub folders & which will applicable for the application? Posted by: Shankul2784 We can put one web.config in each subfolders but which is at the application root folder web.co consider as the main web.config.

What is the maximum size of uploading file? Posted by: Shankul2784 In the web.config.comments file, find a node called <httpRuntime> that looks like the following <httpRuntime executionTimeout="110" maxRequestLength="4096" requestLengthDiskThreshold="80" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="5000"

enableKernelOutputCache="true" enableVersionHeader="true" requireRootedSaveAsPath="true" enable="true" shutdownTimeout="90" delayNotificationTimeout="5" waitChangeNotification="0" maxWaitChangeNotification="0" enableHeaderChecking="true" sendCacheControlHeader="true" apartmentThreading="false" />

A lot is going on in this single node, but the setting that takes care of the size of the files to be up the maxRequestLength attribute. By default, this is set to 4096 kilobytes (KB). Simply change t increase the size of the files that you can upload to the server. If you want to allow 10 megabyte to be uploaded to the server, set the maxRequestLength value to 11264, meaning that the applic files that are up to 11000 KB to be uploaded to the server. What is the Default Expiration Period For Session and Cookies? Posted by: BangaruBabu Session The default Expiration Period for Session is 20 minutes Cookies The default Expiration Period for Cookie is 30 minutes what is the default port for Http and Https ? Posted by: Deepak.pandey.net2008 NOTE: This is objective type question, Please click question title for correct answer. What is the use of Global.asax File in ASP.NET Application ? Posted by: Samanthajyesta The Global.asax file is an optional file and can be stored in root directory. This File is in accesible for web-sites. This Global.asax file contained in HttpApplicationClass. In Global.asax file we can declare global variables like for example the variables used in master pages because same variables can be used for different pages right.It provides more security than others.

The Global.asax file is used to handle application-level and session-level events. we donot worry about configuring Global.asax because it is itself configured. Accessing the Global.asax file can not be possible. while one request is in processing it is impossible to send another request, we can not get response for other request and even we can not start a new session. while adding this Global.asax file to our application bydefault it contains five methods, Those methods are: 1.Application_Start. 2.Application_End. 3.Session_Start. 4.Session_End. 5.Application_Error.

what is yeild keyword in .net ? Posted by: Pavanandey When ever user want to return a value from an iterator block and again contine from in the ite we use yeild keyword it is used to return the value from a iterator block, it is not supported in v How can we Filter rows in a Datatable ? Posted by: Pavanandey A filter condition can be specified on a datatable to filter row based on the condition specfied datatable = datatable.select("Condition");

Can we have same method with same name and signature in a using partial class ? Posted by: Pavanandey Partial class is the concept of diving a class file in to different files or a single file to enhance the productivity .

We cannot have the same method with same name and signature in partial class it give a compi exception

what is the difference between garbage collection and Dispose Method Posted by: Pavanandey if you want to delete resources(objects) those are not using you should not worry about that gar collecter implicitly call finalize() method and remove all such object but if you want to delete ob forcefully(The larger object you want to delete after completeing task) than you can explicitly c

method.

What is the use of DataPager control? Posted by: Raja DataPager control is the new control introduced in the ASP.NET 4.0. This control is used to do in the Data controls like ListView Server control. The typical syntax of DataPager control is

<asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize=" QueryStringField="pageid"> <Fields> <asp:NumericPagerField ButtonCount="5" /> </Fields> </asp:DataPager>

Where PagedControlID is the id of the Listview, PageSize is the number of records to be displa page, QueryStringField is the querystring for the current page number.

The fields properties can be used to show how many pagination button you would like to have w creates the paging for your ListView control.

More about DataPager control can be found at http://www.dotnetfunda.com/articles/article122 Name of some of the types of evidence in Dot Net in context of CAS Posted by: Puneet20884 1) Site 2) Strong Name 3) Zone 4) URL etc. are few of the evidences in dot net CAS used while creating code groups

What is the class for getting the information that is on Clipboard of your system in windows ap Posted by: Puneet20884 System.Windows.Clipboard is the class used to get what is on clipboard like text , mage etc.

What are the Security policy levels in Dot Net ? Posted by: Puneet20884 1) Enterprise 2) Machine 3) User and 4) Application Domain

each of these are independent from each other and Each level has its own code groups and perm

What is Security policy ? Posted by: Puneet20884 The configurable set of rules that the CLR follows when determining the permissions to grant t Main Difference between User groups and code groups. Posted by: Puneet20884 User groups control the authorization only based on distributed Access Control Lists linked to resource whereas code groups are using centralized permission sets.

What is Code group in Dot Net in context to CAS ? Posted by: Puneet20884 It's a logical grouping of code that's having a specified condition for a membership. FOr Example code in an assembly can belong to one code group in another assembly , the code another group . What is Nothing premission-set in dot net ? Posted by: Puneet20884 It means for no premissions for the code against CAS. What is FullTrust premission-set in dot net ? Posted by: Puneet20884 It means for all the premissions for the code against CAS. Name few built in permission-sets in Dot NET !! Posted by: Puneet20884 1) FullTrust 2) LocalIntranet

3) Internet 4) Execution 5) Nothing as some of the premission-sets in dot net framework

What's the major role of CLR for CAS ? Posted by: Puneet20884 The Common Language Runtime allows code to do only those tasks that the code has permissio perform. Hence CAS is CLR's security system that enforces security policies by preventing una access to protected resources and operations like File system , Printer etc Elements of CAS ? Posted by: Puneet20884 permission sets permissions policy evidence code groups

What's the Purpose of System.Collections.Generic ? Posted by: Puneet20884 It's having the interfaces and classes which define generic collections, which enable users to cre typed collections that provide better type safety and performance.

Name the Namespace used for interfaces and classes that defines the various collections of obje queues, bit arrays, hash tables, dictionaries etc. Posted by: Puneet20884 System.Collections What is the root class of the object hierarchy ? Posted by: Puneet20884 Object What are the types for floating numbers ? Posted by: Puneet20884 Single (for 32 bit) and Double (for 64 bit)

Which namespace does the Color class comes under ? Posted by: Puneet20884 It's System.Drawing Which property need in the email functionality to set to send the content as HTML? Posted by: Lakhangarg IsBodyHTML=True What is the Namespace of ForAuthentication class? Posted by: Lakhangarg System.Web.Security Simple file extension for a dot net handler ? Posted by: Puneet20884 .ASHX

Syntax example to add strong name to an assembly "C:\\aaaa.dll" i.e. to generate a strong nam pair file. Posted by: Puneet20884 sn -k "C:\\aaaa.dll" Name the utility used for adding a strong name to an assembly. Posted by: Puneet20884 sn.exe

What is GAC ? Posted by: Puneet20884 its global assembly cache use to keep the public assemblies centralized to be used by any applic machine (server) Name the utility used to add an assembly into the GAC. Posted by: Puneet20884 gacutil.exe

Under which namespace does the Process class comes ? Posted by: Puneet20884 System.Diagnostics namespace Which namespace provides the classes to interact with system processes. Posted by: Puneet20884 System.Diagnostics How to Avoid the tempering of your page's viewstate ? Posted by: Puneet20884 using EnableViewStateMac="true" in the page directive in the HTML !! Difference between DropDownList and ListBox in ASP.NET Posted by: Poster The basic difference between DropDownList and ListBox in ASP.NET are following

1. Only one items of DropDownList is visible when it renders on the page. More than one item ListBox is visible when it renders on the page. 2. Only one item can be selected in DropDownList. More than one item can be selected in Listb SelectionMode is Multiple as in the below code snippets. Both controls are rendered as "<select>" html tag in the HTML. DROPDOWNLIST <asp:DropDownList ID="drop1" runat="server"> <asp:ListItem Text="One" Value="1" /> <asp:ListItem Text="Two" Value="2" /> </asp:DropDownList>

For more details on DropDownList click http://www.dotnetfunda.com/tutorials/controls/dropd LIST BOX <asp:ListBox ID="list1" runat="server" SelectionMode="Multiple">

<asp:ListItem Text="One" Value="1" /> <asp:ListItem Text="Two" Value="2" /> </asp:ListBox> For more details on ListBox click http://www.dotnetfunda.com/tutorials/controls/listbox.aspx Thank you.

What is Multi-Targeting in .net? Posted by: Kumarsudu In the previous version of Visual Studio, each Visual Studio release supports to a specific versio .NET Framework. For example, VS 2002 only worked with .NET 1.0, VS 2003 only worked wit and VS 2005 only worked with .NET 2.0.

Now with the major change in VS2008 is to support "Multi-Targeting " Visual Studio 2008 is used to create projects that target .NET Framework version 2.0, 3.0, or 3. call as "Multi-Targeting". To create a excel file using COM. Whether we need to change any dcom configuration? Posted by: Nishithraj Yes we need to give the proper rights to the ASPNET user How do we change the configurations of com dcom obhects Posted by: Nishithraj Through the tool Dcomcnfg.exe Whether we can use vbscript and javascript combination for validation? Posted by: Nishithraj No, we can't use them together, since the compilers are different. Whether for each modifications of code behind files we need to have a compilation Posted by: Nishithraj Yes, its required.

Whether javascript in the aspx(inline javascript) requires to compile each time for every modif Posted by: Nishithraj Not necessary just saving the aspx file and refreshing the browser is enough to get the updation how many type can maintain state at server side ? Posted by: Sagarp NOTE: This is objective type question, Please click question title for correct answer. What are the different states in ASP.NET? Posted by: Abhisek view state session state application state

What is the use of profiles in ASP.NET? Posted by: Abhisek ASP.NET provides profile feature to keep track of user data. Although a profile is similar to se object, it persists between user session as it is stored in a database.

For example we can use profiles we can keep track of the products ordered by an user in an sho application and when the user starts a new session, you can display those products in a "ordere listbox. How ASP .NET different from ASP? Posted by: Abhisek In ASP.NET Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server.

How to manage pagination in a page? Posted by: Abhisek Using pagination option in DataGrid control. We have to set the number of records for a page, care of pagination itself.

What is smart navigation? Posted by: Abhisek The cursor position is maintained when the page gets refreshed due to the server side validation page gets refreshed.It is called smart navigation.

How do you validate the controls in an ASP.NET page? Posted by: Abhisek Using special validation controls such as Range Validator, Email Validator we can validate the ASP.NET page. ASP.Net pages are compiled and are not interpreted. True or False. Posted by: Abhisek True

What is Authentication and Authorization. Posted by: Sagarp An authentication system is how you identify yourself to the computer. The goal behind an auth system is to verify that the user is actually who they say they are. Once the system knows who the user is through authentication, authorization is how the system what the user can do.

what is PrePageExecute() event Posted by: Blessybaby By overrriding the PrePageExecute Method you can subscribe to the page's InitComplete Even dependencies into any UserControl's found on the page at that time. Since the MasterPage is a UserControl, this includes the MasterPage as well if there is one. How do we enable tracing ? Posted by: Blessybaby <%@ Page Trace="true" %> What is Tracing in ASP.NET ? Posted by: Blessybaby Tracing allows us to view how the code was executed in detail. What namespaces are necessary to create a localized application Posted by: Puneet20884 NOTE: This is objective type question, Please click question title for correct answer. State True or False: C# supports multiple-inheritance

Posted by: Puneet20884 False Bitwise OR operator in C# is Posted by: Puneet20884 NOTE: This is objective type question, Please click question title for correct answer. The keyword int maps to one of the following .NET types Posted by: Puneet20884 NOTE: This is objective type question, Please click question title for correct answer.

The method that transfers ASP.NET execution to another page, but returns to the original pag done is Posted by: Puneet20884 NOTE: This is objective type question, Please click question title for correct answer. The RangeValidator control supports the following datatype Posted by: Puneet20884 NOTE: This is objective type question, Please click question title for correct answer.

How will you prevent your Image not to come from caching (Issue generally when you have edi new one). Posted by: Puneet20884 Add a querystring with you imageurl or src which is a random number or simply datetime, url different everytime, so will not pick from cache !! How the SQL Server Session state entry is in the Web Config ?? Posted by: Puneet20884 <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />

Whether Cookies is used for session? Posted by: Nishithraj If the attribute Cookiless has the value false in web.config means the session uses cookies. How do we do paging in gridview? Posted by: Nishithraj Make Allowpaging=true also specify the PageIndex as some value

Namespace and Assembly? Posted by: Puneet20884 Namespace is a logical design-time naming convenience, whereas an assembly establishes the n for types at run time.

Diff b/w dataset.clone and dataset.copy Posted by: Puneet20884 dataset.clone copies just the structure of dataset (including all the datatables, schemas, relation constraints.); however it doesnt copy the data. On the other hand dataset.copy, copies both the structure and the data. Diff b/w Const and readonly? Posted by: Puneet20884 A const can not be static, while readonly can be static.

A const need to be declared and initialized at declaration only, while a readonly can be initializ declaration or by the code in the constructor. A consts value is evaluated at design time, while a readonlys value is evaluated at runtime. Diversities between static or dynamic assemblies ? Posted by: Puneet20884 Assemblies can be static or dynamic.

Static assemblies can include .NET Framework types (interfaces and classes), as well as resourc assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files.

You can also use the .NET Framework to create dynamic assemblies, which are run directly fro

and are not saved to disk before execution.You can save dynamic assemblies to disk after they h executed. How can you show the number of visitors of your app Posted by: Puneet20884 By havving an application variable and Incrementing it in every session start. TO Achieve it use the Global.asax file's Application_Start and Session_Start Events. What is the namespace provides MVC pattern? Posted by: Nishithraj System.Web.Mvc What are all the navigation controls available with asp.net? Posted by: Nishithraj Menus Site Maps Tree View Where smart naviagation is used? Posted by: Nishithraj Smart navigation is used to keep the cursor postions in post backs Whether ASP.NET is compiled or interpretted? Posted by: Nishithraj It is compiled one.

What is MVC Pattern? How it is involved in ASP.NET? Posted by: Nishithraj MVC means Model View Controller. Microsoft has implemented MVC pattern in ASP.NET fo building of web applications. The seperation of UI part and codebehind part is based upon the What data type does the RangeValidator control support? Posted by: Blessybaby Integer, String and Date

What are different types of directives in .NET? Posted by: Blessybaby @Page: Defines page-specific attributes used by the ASP.NET page parser and compiler. Can b only in .aspx files <%@ Page AspCompat="TRUE" language="C#" %> @Control:Defines control-specific attributes used by the ASP.NET page parser and compiler. C included only in .ascx files. <%@ Control Language="VB" EnableViewState="false" %> @Import: Explicitly imports a namespace into a page or user control. The Import directive can more than one namespace attribute. To import multiple namespaces, use multiple @Import dir @ Import Namespace="System.web" %> @Implements: Indicates that the current page or user control implements the specified .NET fr interface.<%@ Implements Interface="System.Web.UI.IPostBackEventHandler" %> @Register: Associates aliases with namespaces and class names for concise notation in custom control syntax.<%@ Register Tagprefix="Acme" Tagname="AdRotator" Src="AdRotator.as @Assembly: Links an assembly to the current page during compilation, making all the assemb and interfaces available for use on the page. <%@ Assembly Name="MyAssembly" %><%@ Src="MySource.vb" %> @OutputCache: Declaratively controls the output caching policies of an ASP.NET page or a us contained in a page<%@ OutputCache Duration="#ofseconds" Location="Any | Client | Down Server | None" Shared="True | False" VaryByControl="controlname" VaryByCustom="brow customstring" VaryByHeader="headers" VaryByParam="parametername" %> @Reference: Declaratively indicates that another user control or page source file should be dyn compiled and linked against the page in which this directive is declared.

What is different b/w webconfig.xml & Machineconfig.xml Posted by: Blessybaby Web.config & machine.config both are configuration files.Web.config contains settings specific application where as machine.config contains settings to a computer. The Configuration system searches settings in machine.config file & then looks in application configuration files, Web.con appear in multiple directories on an ASP.NET Web application server. Each Web.config file ap configuration settings to its own directory and all child directories below it. There is only Mach file on a web server. How can you provide an alternating color scheme in a Repeater control? Posted by: Blessybaby Using the AlternatintItemTemplate Which two properties are on every validation control? Posted by: Blessybaby We have two common properties for every validation controls 1. Control to Validate, 2. Error Message.

Which method do you use to redirect the user to another page without performing a round trip client? Posted by: Blessybaby Server.transfer

How do you register JavaScript for webcontrols? Posted by: Blessybaby You can register javascript for controls using <CONTROL -name>.Attribtues.Add(scriptname method.

When do you set "<IDENTITY impersonate="true" />? Posted by: Blessybaby Identity is a webconfig declaration under System.web, which helps to control the application Id web applicaton. Which can be at any level (Machine, Site, application, subdirectory, or page), a impersonate with "true" as value specifies that client impersonation is used.

What is web.config file ? Posted by: Blessybaby Web.config file is the configuration file for the Asp.net web application. There is one web.confi asp.net application which configures the particular application. Web.config file is written in XML with specific tags having specific m includes data which includes connections,Session States,Error Handling,Security etc.

What is validationsummary server control?where it is used?. Posted by: Blessybaby The ValidationSummary control allows you to summarize the error messages from all validatio on a Web page in a single location. The summary can be displayed as a list, a bulleted list, or a paragraph, based on the value of the DisplayMode property. The error message displayed in th ValidationSummary control for each validation control on the page is specified by the ErrorMe property of each validation control. If the ErrorMessage property of the validation control is n error message is displayed in the ValidationSummary control for that validation control. You c specify a custom title in the heading section of the ValidationSummary control by setting the H property. You can control whether the ValidationSummary control is displayed or hidden by setting the ShowSummary property. The summary can also be displayed in a message box by setting the ShowMessageBox property to true.

What are the various ways of securing a web site that could prevent from hacking etc .. ? Posted by: Blessybaby 1) Authentication/Authorization 2) Encryption/Decryption 3) Maintaining web servers outside the corporate firewall. etc., Name the validation control available in asp.net?. Posted by: Blessybaby RequiredField, RangeValidator,RegularExpression,Custom validator,compare Validator What is a PostBack? Posted by: Blessybaby The process in which a Web page sends data back to the same page on the server.

What is the difference between in-proc and out-of-proc? Posted by: Blessybaby An inproc is one which runs in the same process area as that of the client giving tha advantage the disadvantage of stability becoz if it crashes it takes the client application also with it.Outpro which works outside the clients memory thus giving stability to the client, but we have to comp on speed. What is the COM available to access the internet explorer in winForm? Posted by: Nishithraj Microsoft Internet Controls from the COM components I need to remove all items from the session. Tell me the code? Posted by: Nishithraj Session.Contents.RemoveAll() Whether inline, embedded and external style sheets are same? Posted by: Nishithraj No, they are different. External Style Sheet : An external style sheet is a seperate style sheet file used by many pages.

Internal Style Sheet : An internal style sheet used specifically for a single page within the page Inline Styles : This can be achieved by the style property of each control. Whether azure supports all OS? Posted by: Nishithraj No it supports Windows 7, Vista, Windows 2008 server.

What is the difference between document.getElementById('<%= btnMakeUpdate.ClientID %> AND document.getElementById('<%= btnMakeUpdate.UniqueID %>')? Posted by: Virendradugar There is no difference. Both will use control's id seperated using $ sign. MaintainScrollPositionOnPostback will work in Ajax Postback. Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

You are going to deploy a website on live server. Which build option you will select while build website? 1. Debug 2. Release Posted by: Virendradugar You should select Release .

Your site is deployed on testing server and you make some change in web.config file stored on t What will happen to the user's who are accessing site at that time? Posted by: Virendradugar When you make any change in web.config file then IIS restarts automatically so all the session application variables get reset. This can affect user drastically as their session is lost. Can you add title to browser history point? Posted by: Bhakti Yes, we can add.

Can you hash state information of URL ? Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

Can you have multiple form tags in a page? Posted by: Bhakti YES. Page can have multiple form tags but only one of them can contain runat=server atrribute at Can you diplay image with hyperlink field of gridview? Posted by: Bhakti Yes, you can. You just need to set its text property to the desired image. Code below can make it clear: <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:HyperLinkField Text="<img src='1.gif'/>" /> </Columns> </asp:GridView>

You need to combine two database fields: Employee id and Name (EmpID : Name) and display column of DataGrid. How can you do it? Posted by: Bhakti This can be achieved any of the two ways. You can combine these two database fields in the template column of the gridview as shown be <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateColumn HeaderText="Name"> <itemtemplate> <%# Container.DataItem("EmpID") %>, <%# Container.DataItem("Name") %>

</itemtemplate> </asp:TemplateColumn> </Columns> </asp:GridView>

Other way of doing the same is to perform operation at database side. Retrieve the combined v column and bind the same with the databound column of the gridview. Database side(SQL): Select empid + : + name as name from emps; <asp:GridView ID="GridView1" runat="server"> <Columns> <asp:BoundField DataField="Name"> </Columns> </asp:GridView> More preferable way is the second one as it will be less combursome.

Suppose you have CausesValidation Property to False for a button and you are calling a javasc onClientClick event of the button. Will your javascript function will be called? Posted by: Virendradugar Yes. It will be called. As CausesValidation property, if set to false then it will not perform any v related to asp.net Validation controls. Thanks, Virendra Dugar

What is CausesValidation Property in ASP.NET? Posted by: Virendradugar CausesValidation property determines whether validation must be performed on button click o asp.net validation control are used. It can be either true or false. By default it is true.

It is mostly used for Cancel/Reset button, where we don't want to perform any kind of validatio

<asp:Button ID="btnCancel" runat="server" Text="Cancel" Visible="false" CausesValidation="false" /> Select name of the file to which trace log is written? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

See below given code. Will it run? try { Response.Write("In Try block"); } finally { Response.W Finally block."); } Posted by: Virendradugar Yes, it will run.

A try block can exists without a catch block if there is finally block. Try block is only valid whe either a catch block or finally block. Is it possible to place a try block without a catch or a finally block? Posted by: Virendradugar No. We cannot place try block without catch or finally block. A try block can only exists if there is or finally block.

Can you access the master page control in content page without FindControl method of master Posted by: Virendradugar Yes. There is another way of accessing the master page control other than findcontrol() method code: MyMasterPage objMasterPage = this.Master; objMasterPage.MasterPageTextBox1.Text = "Text set from Content Page."; Can you access controls placed in master page in content page? Posted by: Virendradugar Yes. We can access it. Using FindControl method of Master Page class.

Master.FindControl("Header") Is it possible to assign Master Page Dynamically? Posted by: Virendradugar Yes. It's possible. You can assign master page in Pre_Init method of content page. At which event Master Page and Content Page's contents are merged to build a single page? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer. Can you place content of child page, outside the content place holder of Master Page? Posted by: Virendradugar No. You can not. Can you place more than one contentplaceholder in a master page? Posted by: Virendradugar Yes. It's possible to have.

What do you mean by ContentPlaceHolder in Master Page? Posted by: Virendradugar Master Page works as a parent page for all child pages. There will be some area in master page be used to replace the content of master page with the child page's content. That area is called ContentPlaceHolder. <asp:ContentPlaceHolder ID="Body" runat="server"> </asp:ContentPlaceHolder> Over here, content of child page will be displayed. What are the parts of Master Pages? Posted by: Virendradugar Mainly there are two parts of Master Page. 1. The area for Master Page content

2. Area for the child Page, which is replace by child pages content. What is the extension for a Master Page file? Posted by: Virendradugar The extension of Master Page file is .master. Master Pages be nested. Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer. Session state variables are type safe. Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

Suppose you have deployed the website at production server. Now you have to change one of th style sheet file? How will you do it? After making change do you think, you need to compile it a deploy it? Posted by: Virendradugar You can directly change the style at runtime at production server. And there is no need to com deploying the website again. Tell us the different ways to apply CSS in web page? Posted by: Virendradugar There are 3 different ways to apply CSS to any page.

1. Create a style sheet file and define all your styles and just provide the reference of the style s the head section using link tag. 2. Define style in head element of your page and use that styles in your page. 3. Define style inline. Inline style means add style attribute to particular HTML element. What should be done to avoid Script Injection? Posted by: Virendradugar To avoid script injection, following things can be done 1. Don't allow user to enter < and > characters as input.

2. Always Encode user's input and then store in the database. What you should do to avoid SQL Injection? Posted by: Virendradugar To avoid or minimize attack of SQL Injection, always use stored procedures or Parameterized

Limitation of boxing nullable type. Posted by: Bhakti If we try to box the object which has no value(which is null) the object reference is assigned to n of boxing.

DetailsView and FormView - Which is better? Posted by: Bhakti Both the controls, DetailsView and FormView are almost similar with the functionalities. Both insert, edit and delete for the records. The only difference we can find is the layout they suppor DetailsView is composed of DataFields while FormView is composed of templates which leads t format and flow format consequently. Hence, with concern to layout and design, FormView is m to use.

What is DetailsView? Posted by: Bhakti DetailsView is used when you need to display various fields of a single record in a tabular form

is there any event "ModeChanged"? Posted by: Bhakti Yes. The event "ModeChanged" is available with DetailsView Control. It take place whenever DetailsView attempts to change between mode of edit,insert and read-on DetailsView also supports "ModeChanging" event. How can you cancel update/cancel of gridview ? Posted by: Bhakti The simplest way to do it is, e.cancel = true; For gridview, data-binding expressions are resolved at,

Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. You can use ^ operator to perform logical exclusive-or with, Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. What is ?? operator ? Posted by: Bhakti ?? is called null-coalescing operator. It is used to define default value of nullable types. Performing binary operations with Double type can result,... Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. What is Value Equality Posted by: Bhakti To determine whether two objects contain the same value or values is called Value Equality.

What is Reference Equality Posted by: Bhakti To determine whether two variables refer to the same underlying object in memory is called Re Equality. ObjectReferenceEquals() is used to make this happen. What are the common security threats for any asp.net application? Posted by: Virendradugar Common threats are: 1. Cross side scripting 2. SQL Injection 3. Storing Password in simple format. 4. No validation for user input. Is it possible to delete application level settings if you have not logged in to application? Posted by: Bhakti

If you are using DeleteSetting function to accomplish the requirement then it is not possible. As DeleteSetting function requires to access the HKEY_LOCAL_USER registry key, which is not user logs on interactively. Is it possible to delete applications all setting? Posted by: Bhakti Yes, it is possible with DeleteSetting function. The function can take 3 arguments of application name, section name and key name. If all of these are present then it deletes the specified key. But in case if you have specified only argument of application name, it deletes all settings. DeleteSettings(testApp) Deletes all setting of testapp

Is there any difference between UCase and toUpper? Posted by: Bhakti With concern of the functionality both of these works same. The most evaluated parameter has performance - even with that it is minor of 5-7%. So unless, you have millions iterations to be p with strings, you don't have to get worried about the performance of them. String functions are faster. The same is true with toLower and LCase. All session content can be Removed ? Posted by: Chikul Yes, All session content can be Removed using following codes : Session.Contents.RemoveAll() it Removes all items from current Session. How to print out all the variables in the Session? Posted by: Chikul Yes, Using "Session.Keys" we can get all session variables In VB.NET Dim strSesVar as string For Each strSesVar In Session.Keys Response.Write(strSesVar + " : " + Session(strSesVar).ToString() + "<br>") Next

In C# foreach (string strSesVar in Session.Keys) { Response.Write(strSesVar + " : " + Session[strSesVar].ToString() + "<br>"); }

What is the difference between Session.Abandon() and Session.Clear()? Posted by: Chikul Session.Abandon() will end current session by firing Session_End and in the next request, Sessi will be fire. Session.Clear( ) just clears the session data without killing it. With session.clear variable is not from memory it just like giving value null to this session. Session ID will remain same in both cases, as long as the browser is not closed.

How to Invoke the Server Code on the Click of Checkbox in a DataGrid column. Posted by: Puneet20884 As there is no CommandName property of Checkbox so when in Datagrid or any databound co the AutoPostBack to True and bind to its event "OnCheckedChanged" and define it in the Ser will work. What will it result CInt(1.8) CInt(-1.8) CInt(-1.2) Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

Thumbrule for DirectCast Posted by: Bhakti One type must inherit from or implement the other type DirectCast generates a compiler error if it detects that no inheritance or implementation relatio

Which one is faster DirectCast or CTYpe. Posted by: Bhakti DirectCast. CType uses the Visual Basic run-time helper routines for conversion which makes it slower the DirectCast.

Is var i = (i = test); possible ? Posted by: Bhakti No. It is not possible. Variabled declared with Var can not be used in its initialization statem can do with explicit data. (int i=(i=test);

This function returns character string representing the specified datepart of the specified date. Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

A textbox generally gets named as "ctl00$Body$txtClientName". Can you control naming of th Posted by: Bhakti With the latest release of VS 2010, the answer gets changed to Yes from No. Runtime naming of the controls were generally handled by complex algorithms running behind application. But it was overhead with length of the control names. With the VS 2010, now user can define pattern of the control naming. With wchich function you can get integer value for the specified part of the specified date ? Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. How to start NotePad file in AsP.NET with code ? Posted by: Chikul System.Diagnostics.Process.Start("Notepad.exe"); What method must be overridden in a custom control ? Posted by: Chikul The Render() method Where do you store the information about the user locale Posted by: Chikul System.Web.UI.Page.Culture What is the lifespan for items stored in viewstate Posted by: Chikul Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).

Name two properties common in every validation control? Posted by: Chikul ControlToValidate property and Text property. What is the transport protocol you use to call a Web service? Posted by: Chikul SOAP (Simple Object Access Protocol) Where are shared assemblies stored? Posted by: Chikul In Global assembly cache. What is the maximum number of cookies that can be allowed to a web site Posted by: Chikul 20 cookies

Which class can be used to perform data type conversion between .NET data types and XML ty Posted by: Chikul XmlConvert What Type of Processing model asp.net simulates ? Posted by: Chikul Event-driven What is the size of the session ID ? Posted by: Chikul 32 bit long integer Client Sertificate is a collection of ___________ ? (Request / Response / Server) Posted by: Chikul Request

What is PLINQ Posted by: Bhakti PLIONQ stands for parallel LINQ. As the name clearly implies it is parallel implementation of Objects. (Introduced with VS 2010)

Can you find label placed in footer template of repeater in itemdatabound event of the same? Posted by: Bhakti No. You cant find this item. Because the second argument of the event is RepeaterItemEventArgs, which doesnt include fo into them.

Can I make viewstate enabled for controls where Enableviewstate of the container page is set to Posted by: Bhakti No. You can set it to true or false as per your requirement but in fact it will not have any effect to t Because viewstate in ASP.NET has hierarchical nature. Hence, following code will not work if y EnableViewState = false; for page. protected void Page_Load(object sender, EventArgs e) { txtTest.EnableViewState = true; }

Is it possible to read Web.config or Global.asax files from browser? Posted by: Virendradugar No. It is not possible . As Machine.Config file has configuration settings which has entries that CONFIG files, ASAX file with an HTTP handler "HttpForbiddenHandler", which prevents to associated file.

What is the difference between UniqueID and ClientID? Posted by: Virendradugar Well, both the properties are associated with asp.net control. The difference is Unique ID has '$ sign and Client ID adds '_' (hyphen) to the control, if master page is used.

Let's say you have placed a text box called 'txtName' in content place holder. So client ID will b ct100_ContentPlaceHolder1_txtName where Unique ID will be ct100$ContentPlaceHolder1$tx

ClientID is used to access control in Java Script where using Unique ID you can make a post ba java script__doPostBack() function. Thanks, Virendra Dugar Elements of jagged array are of Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. How can we make file hidden ? Posted by: Bhakti With C# or VB, we just need to set attribute of file as Hidden to make it hidden. f.Attributes = FileAttributes.Hidden f is New FileInfo(filePath) The capacity of the stringbuilder get increased, Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

Using which property you can check on the server whether validators controls are satisfied or n Posted by: Virendradugar The answer is Page.IsValid . Always ensure that you check Page.IsValid before doing any kind when working with Validator Controls. How does ASP.NET store SessionIDs by default? Posted by: Chikul NOTE: This is objective type question, Please click question title for correct answer.

How will you make strings with TitleCase ? Posted by: Bhakti With dynamic pages, sometimes you need to create titles dynamically. At such stage you can no check whether they are stored in proper Title case or not. To make this task happen you can us provided toUpper() and toLower() methods but that would be much time consuming and tedio can use, titlecase() method to make it single linear task.

Dim strTest As String = "testing title case"

strTest = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(strTest.ToLower()) ' will result Te Case

How to redirect user to secure connection ? Posted by: Bhakti To redirect user to https(to a secure connection), you can define uri scheme to UriSchemeHttps UriBuilder testuri = new UriBuilder(Page.Request.Url); testuri.Scheme = testuri.UriSchemeHttps;

can we use session variable in App_code Class page ? Posted by: Chikul Yes. By using "HttpContext.Current.Session("VarName") ", we can use current session variable in Class page

What is capacity and length for StringBuilder ? Posted by: Bhakti By specifying capacity you can indicate number of characters the instance object of stringbuild while the length is the character count of the string the stringbuilder holds. Specifying lesser capacity and longer string will make capacity to get expanded to accommodat supplied string. But specifying higher capacity and lesser length will shorten the string content Unless specified, the default capacity of the stringbuilder is 16. Dim sb As New StringBuilder("Hi", 5) ' initial capacity is set to 5 Response.Write(sb.Capacity) ' will print 5 Response.Write(sb.Length) ' will print 2 sb.Append(" testing") Response.Write(sb.Capacity) ' will print 10 Response.Write(sb.Length) ' will print 10

sb.Length = 5 Response.Write(sb) ' will print hi te

You need to prefix something with the retrieved amount (Positive, negative, zeros). How will yo this? Posted by: Bhakti In such case you can use, custom numeric format string. Example given below can make it clearer. Dim num As Double num = 100 Dim MyString As String = num.ToString("Test positive : #,##0.00;") num = -100 MyString = num.ToString(";Test negative : [ $#,##0.00 ]") num = 0 MyString = num.ToString(";;It's zero. :( :( ")

Does isMaxLengh work with multiline textbox ? How can you handle such situation? Posted by: Bhakti No, isMaxLength doesnt work with multiline textbox. You need to handle such situation some other way. Javascript can be an option to deal with thi You can use, following function to achieve the said functionality function isMaxLength(txtBox, length) { if(txtBox) return (txtBox.value.length <= length-1);

} Which can be used with multiline textbox as below

<asp:TextBox ID="txtNotes" Width="92%" TextMode="MultiLine" Rows="6" runat="serve onkeypress='javascript:return isMaxLength(this,16);' ></asp:TextBox> What namespace does the Web page belong in the .NET Framework class hierarchy? Posted by: Chikul System.Web.UI.Page

What is smart navigation in .NET? Posted by: Chikul SmartNavigation is the property used in <%@ Page %> tag. It works with 1.1 & versions before it. For Version 2.0 and next instead of it we can use "SetFocus" and "MaintainScrollPositionOnP Smart Navigation basically enhances a web pages in the following way: 1. The scroll position of a Web page is maintained after postback. 2. The element focus on a Web page is maintained during navigation. 3. Only the most recent Web page state is retained in the Web browser history folder. 4. The flicker effect that may occur on a Web page during navigation is minimized. How do you send data through querystring to another page without displaying it in the URL? Posted by: Virendradugar Use Server.Transfer method to send user to another page.

What is Captacha Image and why it is used? Posted by: Virendradugar CAPTCHA =Completely Automated Public Turing test to tell Computers and Humans Apart It means that its kind of test which a human can pass but a computer program cannot pass it. almost in every site when you make a sign up. Captcha is an image with some distorted text. It only alphabets, numbers or both depend on the programmer.

It is used to stop spamming as using web bots the process of sign up or submitting feedback can

automatic. But having Captcha as additional level input stops web bots from doing successful s web bots cannot read Captcha image content. How many ViewState objects can be created on an aspx page ? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

how to handle EmptyDataTemplate with repeater ? Posted by: Bhakti Unlike gridview, you cant find <EmptyDataTemplate> with repeater. You need to handle such some different way. One of the way to handle this is, to keep label(initially hidden) in the footer repeater. With ItemDataBound event, you can get item count of the repeater and from that cou decide visibility of the label in footer. How to assign class to htmltablerow runtime? Posted by: Bhakti With htmltablerow, you cant find property like class/cssclass. With such situation, you need to add attribute of Class to the desired htmltablerow. With below code, I am adding class NavyYellow to found tablerow trMain Dim trMain As HtmlTableRow trMain = CType(e.Item.FindControl("trMain"), HtmlTableRow) trMain.Attributes.Add("class", "NavyYellow")

How you can determine whether client is connected to server or not? Posted by: Bhakti With some of the scenarions, you need to determine whether client has reset the connection or n Response.IsClientConnected , we can know whether client is connected to the server or not. Garbage collector runs ? Posted by: Muhilan NOTE: This is objective type question, Please click question title for correct answer. Which of the following does the actual .NET code execute ? Posted by: Muhilan

NOTE: This is objective type question, Please click question title for correct answer. You want to only get changed data in a dataset which of the below is the best way ? Posted by: Muhilan NOTE: This is objective type question, Please click question title for correct answer. What is the fastest way to concat strings in ASP.NET ? What should you do? Posted by: Muhilan NOTE: This is objective type question, Please click question title for correct answer.

As a developer you are displaying product data from SQL Server. Product table has Productid ProductName. You write ADO.NET code that uses a SqlDataAdapter object and a SqlComman retrieve the product data from the database by calling a stored procedure. You set the Comma property of the SqlCommand object to CommandType.StoredProcedure. You set the Comman property of the object to procProductList. Your code successfully files a DataTable object with products that is sorted by ProductID in descending order. You want the data to be displayed in alphabetic order by ProductName. What should you do? Posted by: Muhilan NOTE: This is objective type question, Please click question title for correct answer.

What concept does the above sample code demonstrate? internal class Piston {} internal class E { private Piston[] myPistons = new Piston[4]; public bool Ignition() { //some code } } public clas { private Engine myEngine = new Engine(); public void Start() { //put in keys etc.. if (myEngine //some more code } } } Posted by: Muhilan NOTE: This is objective type question, Please click question title for correct answer.

Does defaultbutton of form tag works with ImageButton? Posted by: Bhakti No. It does not. You need to handle such scenarios using code or JavaScript (This will be preferrable as default doesnt work also for FireFox) In your asp page, HTML tag and CacheControl will be specified Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

What is the difference between the Theme and StylesheetTheme? Posted by: Virendradugar The StylesheetTheme attribute works same as the Theme attribute.The difference is that the w attributes are set locally on the page within a particular control, the attributes are overridden b if you use the Theme attribute. They are kept in place, if you apply the pages theme using the StylesheetTheme attribute. Suppose you have a text box control like the following: <asp:Textbox ID=TextBox1 Runat=server ForeColor=#ffffff />

In this example, the ForeColor settings is overridden by the theme if you have applied it using the Theme attribute in the Page directive. If, instead, you applied the theme usi StylesheetTheme attribute in the Page directive, the ForeColor settings remain in place, even if explicitly defined in the theme. Default ContentType of Response.ContentType is Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

What is the easiest way to bring down any website in ASP.NET? Posted by: Virendradugar There is a simple way to bring down your ASP.NET 2.0 application. The only thing you have to create simple html file called App_offline.htm and deploy it to your ASP.NET 2.0 web applicat directory. The rest is handled by ASP.NET runtime internal routines.

The way app_offline.htm works is that you put the file in the root directory of the application. ASP.NET sees it, it will shut-down the app-domain for the application (and not restart it for re instead send back the contents of the App_offline.htm file in response to all new dynamic reque application. When you are done updating the site, just delete the file and it will come back onlin What is the lifetime of ViewState? Posted by: Virendradugar ViewState exists for the current requested page including post backs to the same page. How will you set focus to the control?

Posted by: Bhakti You can do it either using JS, for attribute or control method. With JS, you will have to use focus method. function focustest() { document.getElementById("TextBox5").focus(); } With form, you can add attribute called defaultfocus to the desired control. defaultfocus="TextBox5 " sets focus to textbox5. And programatically, you can set it by : TextBox5.Focus()

Is it possible to maintain scroll bar positions during postbacks ?


Posted by: Bhakti

Yes, You

just

need

to

set

it MaintainScrollPositionOnPostback

attribute

value

<%@ Page Language="vb" AutoEventWireup="false" MaintainScrollPositionOnPostback="true" %>

Justify : Custom validator gets executed only at client side.


Posted by: Bhakti

The answer is true and false both. Its as per specifications provided in the code. If you want to side validation then it almost becomes browser specific. You can handle such situation by specifyin validation with OnServerValidate

But in case of server side validation with custom validator, you need to be assured that the control bei visible and having For an

<asp:TextBox ID="txt" runat="server"></asp:TextBox>

<asp:CustomValidator ControlToValidate="txt" OnServerValidate="test" ClientValidationFunc ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator"></asp:CustomValidator>

<asp:button id="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit" />

Public Function test(ByVal obj As Object, ByVal objArgs As ServerValidateEventArgs) As Boolean If Not obj Is Nothing Then Return true End If End Function Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)

End Sub

is it possible to add APP_Code folder in web application project in Visual Studio 2005 or later?
Posted by: Virendradugar

No. It's not possible. Web application project does not allow users to add app_code folder where w does.

Process Used for Maintain State Server Session ?


Posted by: Abhijit Jana

NOTE: This is objective type question, Please click question title for correct answer.

Which process is used to run ASP.NET Application from Visual Studio IDE ?
Posted by: Abhijit Jana

WebDev.WebServer.Exe

How can we disable session in Page Level ?


Posted by: Abhijit Jana

We can disable session state in page level using EnableSessionState attributes with in Pag <%@ page Langauge="C#" EnableSessionState="False" ...

How can we disabled session for an ASP.NET Application ?


Posted by: Abhijit Jana

We can easily do it by <SessionState Mode="Off"> in System.Web Section.

following

configuration

in

What are the different level of settings are available for configure cookies in browser ?
Posted by: Abhijit Jana

Below

are

the

listed

Cookies

setting

available

on

1. 2. 3. 4. 5.

Accept Medium Block

All

All

We can reached there by Tool -> Internet Option -> Go To Privacy Tab . [ IE ]

What is IsPostback property in asp.net and how does it work?


Posted by: Virendradugar

IsPostBack property indicates that whether this is the first time user has requested fort the page or based on any response on

This property checks for __VIEWSTATE or __EVENTTARGET parameter in Request object. if these p absent that means it is requested for the first time and if these parameters are present then this requ request.

Name the classes thet are used to send a mail?


Posted by: Syedshakeer

1)SmtpClient 2)MailMessage

Which of the following method is correct to send an Email Message?


Posted by: Syedshakeer

NOTE: This is objective type question, Please click question title for correct answer.

Difference between Eval() and Bind()?


Posted by: Syedshakeer

Eval(): -Eval() method proviedes only for displaying data from a datasource in Bind(): Bind() methods provides for two-way binding which means that it cannot be used to dispaly data from a datasource

Name the Protocols that are commonly used for sending and retrieving Email Message? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer.

Base class for classes accessing session-state values, session-level settings, and lifetime managem is Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. What is difference between TransferRequest and Transfer method? Posted by: Bhakti

Transfer: Terminates execution of the current page and starts execution of provided URL. TransferRequest: Performs an asynchronous execution of the provided URL. Which method is used to rewriting/redirecting server-side execution? Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. It is possible to get class or struct indexed just like arrays using Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. Can we to pass more than one querystring parameter with hyperlink in .aspx file? Posted by: Bhakti Yes we can. For an example code can be like, <asp:HyperLink ID="hlClientId" runat="server" "Page.aspx?param1=" & _ DataBinder.Eval(Container.DataItem, "param1") & _ "&param2=" & DataBinder.Eval(Container.DataItem, "param2") %>' >Hyperlink</asp:HyperLink> DetailsView Control can be displayed in which Modes? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Generic Collections are located in which NameSpace? Posted by: Syedshakeer System.Collections.Generic Object type collections are located in the whcih NameSpace? Posted by: Syedshakeer System.Collections

NavigateUrl='<

You can redirect (or) Transfer to a CustomError Page in which block? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer.

Name the constructor which creates a client that can send email to the specified SMTP server? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which protocol for defining the format of an Email message Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which attribute is used to apply the skin to a control of that type Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which method will you use to access second result table of stored procedure with datareader ? Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

What is the name of the base class, from which all the validators controls of ASP.NET is derive Posted by: Virendradugar All the ASP.NET validation controls are derived from BaseValidator Class except Validation S Control. which property is used to check the current connection is secure Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. The URL for a Secure Connection starts with Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. To specify a comment with in a Skin File you must use the Posted by: Syedshakeer

NOTE: This is objective type question, Please click question title for correct answer. To Create a Email Message in HTML format,set the IsBodyHtml Property to Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. The FormsAuthentication class is in the Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which element is used to apply a theme to the current application withint the web.config? Posted by: Syedshakeer <pages theme="name"/>

Is it possible to create cookies with keys? Explain using some example. Posted by: Bhakti Yes , it is possible to create cookies with keys. Cookies is a dictionary at the time of initialization, if key is specified with it. (You can determin cookie is dictionary or not using HasKeys property.) For an example: Response.Cookies("Testcookie")("key1") = "key1" Response.Cookies("Testcookie)("key2") = "key2" After this if you make assignment like, Response.Cookies("Testcookie) = noKey Then, key1 and key2 of cookie("Testcookie) will be deleted. How many ContentsPlaceHolder Controls contains to the MasterPage by default? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer.

HttpApplicationState class stores data in Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. When response expires if there are multiple calls to Response.Expires on a single page? Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

Explain Server.URLEncode Method. Posted by: Bhakti This method applies URL encoding rules, including escape characters. Where Spaces are conve signs and non-alphanumeric characters are converted to their hexadecimal codes. For an example, Response.Write(Server.UrlEncode("http://testurl encode 123.com")); Will result, http%3a%2f%2ftesturl+encode+123.com

Is it possible to use InProc mode for sessionState in case of web garden? Posted by: Virendradugar No, it's not possible. As InProc mode is dependent on the worker process and in case of web ga have multiple worker process so session handling becomes difficult. Either we can use StateSer server mode for web garden. Thanks.

Is it possible to set SessionState to readonly mode? Readonly mode means, we can only read da session but we can not write any data in session variable? Posted by: Virendradugar Yes, it is possible. EnableSessionState property has a value "Readonly" which actually makes the session state re Thanks. What is the difference between Session.Clear() and Session.RemoveAll() method? Posted by: Virendradugar

Well, actually there is no difference. Session.RemoveAll() methods internally makes a call to Cl method only. Thanks.

What is Cookie Munging? Posted by: Virendradugar By default, asp.net uses cookies to store session id for the logged in user. But there is an option browser to disable cookies. If cookies are disabled, then any website will not be able to create co user's machine.

When cookies are disabled, then session Id is gets appended in the URL and passed to the serve decodes it and fulfill the requested page. Cookie Munging is nothing but how ASP.NET manages session variables without cookies. Thanks, Virendra Dugar

What is difference between System.Web.Caching.Cache and System.Web.HttpContext.Curren Posted by: Bhakti System.Web.Caching.Cache : Class/type used for caching System.Web.HttoContect.Current.Cache: Instance of cache class for current HTTP context fro request (Gets cache object from current application domain)

What is persistent and non-persistent cookie? Posted by: Virendradugar Persistent Cookies : This can be said as permanent cookies, which gets stored on user's machin persistent cookie, one need to set the expiry date. Non Persistent Cookies : This is Temporary Cookies which get's stored in browser's memory.

Explain AdRotator control. Posted by: Bhakti AdRotator control is used to present ad images clicking which we can navigate to another web With each page load,ad image can be selected randomly or in specified order from predefined w formatted XML document. Well formatted XML document(Advertisement File) contains required information for the ima needs to be displayed.

Elements of the Advertisement File: ImageUrl: Advertisement Image URL(Absolute/relative) NavigateUrl: Destination web location where user needs to be directed when he clicks the imag NavigateUrl is not set then image is not clickable) AlternateText: [Optional parameter]Text when the user moves mouse pointer over the image Keyword: [Optional parameter] Keyword Impressions: [Optional parameter] Number indicating weight of the ad in the order of rotation to other ads in the file Which property do you use to determine how ASP.NET page was invoked? Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

Which method will you use to Delete the view-state information for all the server control's child Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer. With which method you can set design-time data for a control ? Posted by: Bhakti NOTE: This is objective type question, Please click question title for correct answer.

What is difference between ResolveUrl and ResolveClientUrl ? Which do you prefer to use? Posted by: Bhakti ResolveUrl - Returns URL relative to the site root using controls TemplateSourceDirectory pr

ResolveClientUrl Returns URL relative to the folder containing the source file in which the co instantiated.

I would prefer to use ResolveUrl as URL returned can be used anywhere in the site to make it w correctly. Thanks, Bhakti Shah

What is cross page posting in ASP.NET? Posted by: Bhakti Sometimes, other than round-trip cycle of asp.net web page we need to post one page to anothe configuring controls to be posted to different target page. This is referenced as cross page posti

ASP.NET.

What are the main components of IIS 7.0? Posted by: Virendradugar Main Components of IIS 7.0 are HTTP.Sys, Svchost.Exe, Application Pool , Worker Process (W and Configuration Store.

What is a web garden? Posted by: Virendradugar By default an application pool runs with a single worker process (w3wp.exe). We can allocate m worker process in a single application pool. An application which can have multiple W3WP pro known as web Garden. What is the unit of the Duration property in the OutputCache directives of the UserControl in Posted by: Poster The unit of the OutputCache duration is #ofseconds. This is specified in number of seconds. <%@ OutputCache Duration="60" Shared="True" VaryByParam="None" %>

Above code will cache the user control for 60 seconds ie. 1 minute and the same cached user con shared across whole website (as Shared property is set to true). For more details, visit http://msdn.microsoft.com/en-us/library/hdxfb6cy.aspx Thanks

What is a primary difference between the standard validator controls and the mobile validator Posted by: Virendradugar The mobile validation controls dont provide client-side validation. Where is Cache data storedin memory, on the hard disk, in a database, or on a state server? Posted by: Virendradugar The Cache object is stored in memory.

How can we copy the file from one location to other? Posted by: Lakhangarg Using File.Copy Method we can copy the file from one location to other. System.IO.File.Copy("Source File Path", "Destination File Path"); Can we delete directory having other directory and files? Posted by: Lakhangarg Yes, we can delete directories directly that have files and other directories using System.IO.Directory.Delete("Directory Path", true);

If a users has disabled cookies in his browsers, what can be done to enable forms authentication Posted by: Virendradugar Use the AutoDetect setting. What can you do to make a Web page more useful to a user who does not use a mouse? Posted by: Virendradugar 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 Acce 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. How can you define a control property using a global resource at design time? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

For a blank ASP.NET Page or ViewState Disabled page, will there be any value stored in the _VIEWSTATE field? Note : The Viewstate of an ASP.NET page is created during the page life saved into the rendered HTML using in the "__VIEWSTATE" hidden HTML field. Posted by: Virendradugar Answer is YES.

The reason is that ASP.NET Page itself stores some bytes of information into the _VIEWSTAT Which component is required for all pages that use Web Parts? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

Does ViewState is responsible for maintaining data across the Page Post Back for Postback con textbox, dropdownlist) and non-postbackcontrols(like label)? Posted by: Virendradugar It is false. For NonPostback controls it is true but for postback controls, ASP.NET retrieves the one by one from the HTTP request and copies them to the control values while creating the HT response. If for a Compare Validator control, ControlToCompare and ValueToCompare properties are which property will take precedence? Posted by: Virendradugar The ControlToCompare property takes precedence.

What is the difference between ListBox (Filled with data) and DropDownList (Filled with data) SelectedIndex property? Posted by: Virendradugar The default value of the SelectedIndex property of the Listbox is -1, which indicates that no item in the Listbox. However, the DropDownList control overrides this property and sets the defaul which indicates the first item in the list.

When file upload control is used, you can add maximum 4 mb size of the file. Using which prop extend the limit of file size? Posted by: Virendradugar MaxRequestlength Property needs to be set. It takes value in KB. It can support max 2GB file.

By Default, ASP.NET does not allow HTML tags to be sent to server via client side due to secur Which property needs to be set that allows HTML tags to be processed by server? Posted by: Virendradugar ValidateRequest Property needs to be set to false. By default it's true so it does not allow unenc tags to be processed at server. It can be set at page level or at application level via web.config.

What is the Difference between RegisterStartupScript and RegisterClientScriptBlock? Posted by: Lakhangarg RegisterStartupScript Places the script at the bottom of the asp.net page instead of at the top. a RegisterClientScriptBlock inserts script immediately below the opening tag of the Page . means <form> tag. In an ASP.NET website, when the web.config file is getting called? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer. which namespace is used to implement active directory services? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

What is the difference between Postback and callback? Posted by: Virendradugar Callback send a request to the web page from the client script. A client side function will send r 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 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 b browser. The page goes through its full life cycle and is rendered on the browser. Callback does not redraw the page where postback does.

You catch an unhandled exception in a Page_Error handler. How can you access the last error Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

Is it possible to update a connection string stored in the Web.config file programatically? If Ye Posted by: Virendradugar Yes.

Create a Configuration object. Then, update the connection string using the ConnectionStrings Finally, call Configuration.Save.

What are the four phases of a Web Setup Project deployment? Posted by: Virendradugar Install, Commit, Rollback, and Uninstall. What launch conditions do Web Setup Projects include by default? Posted by: Virendradugar By default, Web Setup Projects check for IIS and the .NET Framework. Which of the following can be share between two pages. Posted by: Santosh4u 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 whi following? Posted by: Santosh4u NOTE: This is objective type question, Please click question title for correct answer. What is LINQ Posted by: Santosh4u NOTE: This is objective type question, Please click question title for correct answer. what is the transport protocol used to call webservise ? Posted by: Santosh4u NOTE: This is objective type question, Please click question title for correct answer.

Which method would you call to send an e-mail message and wait for the transmission to comp proceeding? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

What type of exception will the runtime throw if the SMTP server rejects a recipient e-mail ad Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer. Which of the following browser capabilities can you not check using Request.Browser?

Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

What is the name of the virtual page that you can request to view trace data when the trace dat displayed on its corresponding Web page? Posted by: Virendradugar The virtual page is called Trace.axd.

What is the name of the Web page property that you can query to determine that a Web page i requested without data being submitted? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer. Which control requires the Web.sitemap file to display site map information? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

Is view state lost if a user refreshes a Web page? What if the user copies the URL and open it in browser? Posted by: Virendradugar View state is maintained within a pages HTML, so it is lost if a page is refreshed or if the URL

What is View State Chunking? Posted by: Virendradugar View state chunking is new in ASP.NET, version 2.0.The ViewState property retains values bet multiple requests for the same page. When an ASP.NET page is processed, the current state of controls is hashed into a string and saved in the page as a hidden field. If the data is too long fo field (as specified in the MaxPageStateField-Length property), then ASP.NET performs view st chunking to split it across multiple hidden fields.

Which might not work if a user has disabled cookies in his or her Web browser: application sta state? Posted by: Virendradugar Session state, by default, wont work if a Web browser that supports cookies has cookies disabled. Application state isnt user-specific, though, and doesnt need to be tracke Therefore, application state works regardless of cookies.

Which typically consumes more memory: application state or session state? Posted by: Virendradugar Session state tends to use much more memory than application state, because copies of all varia stored for each user.

What are the different code models available in ASP.NET 2.0? Posted by: Virendradugar There are 2 code models available in ASP.NET 2.0. One is the single-file page and the other one behind page.

Can the App_Code folder contain source code files in different programming languages? Posted by: Virendradugar Yes but you need to create two subfolders inside the App_Code and then add both C# and VB.N respective subfolders. You also have to add configuration settings in the web.config for this to w Can I use different programming languages in the same application? Posted by: Virendradugar Yes. You can create a few pages in C# and a few in VB.NET.

How can you detect if a viewstate has been tampered? Posted by: Virendradugar By setting the EnableViewStateMac to true in the @Page directive. This attribute checks the en encrypted viewstate for tampering.

You catch an unhandled exception in a Page_Error handler. How can you access the last error Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer. ViewState is encrypted. Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

Does SessionID change with every request in the asp.net 2.0 application? Posted by: Virendradugar For any web programmer, its obvious to think and believe that SessionId remains same throug user session and it was right till asp.net1.1. But in asp.net2.0, this behavior has changed. In the

application new sessionid is returned with the response to every request until session objects ar According to MSDN the reason/solution is:

When using cookie-based session state, ASP.NET does not allocate storage for session data un Session object is used. As a result, a new session ID is generated for each page request until the object is accessed. If your application requires a static session ID for the entire session, you can implement the Session_Start method in the applications Global.asax file and store data in the object to fix the session ID, or you can use code in another part of your application to explicitly in the Session object. Enojy

Is it possible that cookies created by asp.net application can only be accessed via server side cod possible to restrict that client side code can not access any cookie? Posted by: Virendradugar Yes.

it is possible to enable HttpOnly programmatically on any individual cookie by setting the Http property of the HttpCookie object to true. However, it is easier and more reliable to configure application to automatically enable HttpOnly for all cookies. To do this, set the httpOnlyCooki of the <httpCookies> element to true. <configuration> <system.web> <httpCookies httpOnlyCookies=true> Can we set priority (High, Medium, Low) of the mail sent via ASP.NET? Posted by: VIRENDRADUGAR Yes. Whats the Difference Between <%# i %> and <%= i %>? Posted by: VIRENDRADUGAR We can use two constructs to access page-level variables in an ASP.NET web template: data binding syntax

Data bindingthe hierarchical mapping of control properties to data container valuesis specified by the <%# %> tags. Code located within a <%# %> code block is only executed when the DataBindmethod of its parent control container is invoked. code rendering syntax The <%= %> code tags output content to the browser. This content could be hard-coded, or it may contain page-level variables.

You need to identify a type that meets the following criteria : Is always a number and Is not a g 65,535. Which type should you choose? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer. You creat a Web site that stores user's active themes in user profile objects. You need to apply preferred themes when they log on to the Web site. What should you do? Posted by: Virendradugar NOTE: This is objective type question, Please click question title for correct answer.

Which of the following classes is required to draw an empty circle? (Choose all that apply.) 1. System.Drawing.Graphics 2. System.Drawing.Pen 3. System.Drawing.Brush 4. System.Drawin Posted by: Virendradugar 1. System.Drawing.Graphics 2. System.Drawing.Pen Graphics class is required to draw the empty ellipse in the form of a circle, Pen class is required to set the border properties of the circle to be drawn. Default setting for the expires attribute of the document.cookie property? Posted by: Lakhangarg The duration of the browser session.

What is Event Bubbling?(Asp.net) Posted by: Initiotech Server Controls like DataGrid,DataGridView , DataList etc have other controls inside them. Example an DataGridView can have an TextBox or an button inside it. These Child Controls can not raize events by themselves,but they pass the event to the parent c (DataGridView), which is passed to the page as ItemCommand event.

This process is known as EventBubling ==================================================== Regards Hefin [...]

What's the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"? Posted by: Virendradugar Code behind is relevant to Visual Studio only. SRC is used when you are using notepad or othe tool. Can we execute any web site without the web.config file? Posted by: Virendradugar Yes, application will inherit cofiguration setting from machine.config file.

How do you turn off cookies for one page in your site? Posted by: Virendradugar Use the Cookie.Discard Property which Gets or sets the discard flag set by the server. When tr property instructs the client application not to save the Cookie on the users hard disk when a s

What are the expiration policies for Cached objects? Posted by: Sandeepv There are two policies for expiration of Cached objects : 1.Absolute expiration: Which is a fixed duration for expiration. The object with an absolute expiration period of say 1minute , will expire completely after 1 mi 2. Sliding expiration: Now here the objects expiration period varies according to the access of the object. If the object is frequently accessed its expiration period also goes on resetting.

I.e . If there is sliding expiration of 1 minute and it is before one minute , then its expiration per to 1 minute. How do you create a permanent cookie? Posted by: Virendradugar Set expires property to Date.MaxValue (HttpCookie.Expires = Date.MaxValue)

What is wrong with this code? Server.transfer("Default.HTML"); Posted by: Virendradugar It is believed that You can not use Server.Transfer method for .HTML file. It only works for .a

but that's not true. This code is correct. try { Response.Write("Try Block:"); return; } catch (Exception ex) { throw; } finally { Response.Write("Finally Block"); } What will be the output for the above code? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. What is the name of class from which web pages are inherited? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which method of HTTP Handler gets invoked when request is received? Posted by: Virendradugar ProcessRequest() method.

What if Some one types the URL of web.config file in the browser? Posted by: Virendradugar ASP.NET configures IIS to prevent direct browser access to web.config files to ensure that thei not become public. Attempt to access web.config file will cause ASP.NET to return 403: Access error. Can an ASPX file contain more than one form marked with runat="server"? Posted by: Virendradugar No. Response.Redirect() can be used to redirect from one page to another page in Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which should be used to redirect on next page in the same server? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer.

What is Difference between Callbacks and Postback in ASP.NET? Posted by: Virendradugar Callback : It is a way to send a request to the web page from the client script. Postback is an ex with processing overhead. In callback a client function sends a request and a special marked m invoked on the server. It does the processing & returns the value which is received by another client function t result. To have client side callbacks, the page has to implement ICallbackEventHandler & imp functions RaiseCallBackEvent & GetCallBackResult.

PostBack: Postback is the event which sends the form data to the server. The server processes t sends it back to the browser. The page goes through its full life cycle & is rendered on the brow be triggered by using the server controls.

What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False" Posted by: Virendradugar When value of the AutoEventWireup attribute is set to false, one must manually hook up event handlers.

When value of the AutoEventWireup attribute is set to true, the ASP.NET page framework can automatically raise events. What is the name of base class for .NET Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Is it Possible to create more than one machine config file. Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Which Function is used to count more than two billion rows in a table? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Is finally block executed if there is no exception? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer.

What is the Extension of web Service ? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. What is Size Limit for Cookies data? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. What is the Purpose of Server.MapPth? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. What is the default authentication system in asp.net web application? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Which type of control Span is in ASP.NET Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Is IIS Mandatory to develop a Web application in ASP.NET 2.0? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Name the property to access Referring page URL? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Name of the event that is not fired during page cycle? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Where does ASP.Net stores sessionIDs by default? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer.

What data types do the RangeValidator control support? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. ow to send XML file on server using HTTP protocol? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. If we remove a web.config file from the application , is this application will work? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Which of the following Regular expression is used to validate a 10 digit phone fied? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Validation Controls are non-visible controls? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which control is used to display the list of Error Messages in asp.net page Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which of the following is Default ErrorMode in CustomError tag? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. Which of the following property is used to set a crosspage posting? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer.

NET class that reads data from a database. Inside this class you need to use a SqlDataReader t any records returned from the database. What property of the DataReader should you check b

attempting to read any records? Posted by: Majith NOTE: This is objective type question, Please click question title for correct answer. Which ADO.NET class allows you to specify SQL text to execute, one or more parameters and specific SQL connection to run against? Posted by: Majith NOTE: This is objective type question, Please click question title for correct answer.

Suppose Page_load event is defined in aspx page and same page_load event in code behind. Wh happen now? How program will run? Posted by: Virendradugar Answer to this is :

The Page_load method in the aspx page will only run.It takes precedence over the one in the co

What is cross page posting in ASP.NET2.0 ? Posted by: Majith When we have to post data from one page to another in application we used server.transfer me this the URL remains the same but in cross page posting there is little different there is normal done but in target page we can access values of server control in the source page.This is quite si have to only set the PostBackUrl property of Button,LinkButton or imagebutton which specifie page.In target page we can access the PreviousPage property.And we have to use the @Previou directive.We can access control of PreviousPage by using the findcontrol method.When we set PostBackURL property ASP.NET framework bind the HTML and Javascript function automa Name Authenication Modes available in web Application? Posted by: Lakhangarg (1) Window authentication. (2) Form Authentication (3) Passport Authentication

How turn off cookies for one page in your site? Posted by: Saantosh --> cookie state= false in web.config file -->Cookie.Discard Property which Gets or sets the discard flag set by the server. When true, th application not to save the Cookie on the user hard disk when a session ends.

How do you explicitly kill a user session? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. What is the maximum number of cookies that can be allowed to a web site? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Name two properties common in every validation control? Posted by: Lakhangarg ControlToValidate property and Text property Which is the first event in page life-cycle Event? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Default Mode for Session State? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer.

What is the Better approach to redirect on other page within the same server? Response.Redir Server.Transfer Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer.

What is code-based security? Posted by: Lakhangarg Code security is the approach of using permissions and permission sets for a given code to run. for example can disable running executables off the Internet or restrict access to corporate dat few applications. To send Emails,you need the following classes from the System.Web.Mail namespace? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer.

How To Get the Referral page's URL? Posted by: Lakhangarg we can get the Referral page's URL using: Request.UrlReferrer.ToString(); Which of the follwoing code have to write for cancel Link in gridview? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer.

Which of the follwoing property has the default property for gridview paging by setting the 'Pa Property? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. How you will get the current Page Url? Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. How to disable the page viewstate by Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. disadvantages of hidden fields? Posted by: Syedshakeer 1)Increases the HTML size of the page. 2)You still cannot store structured data 3)Because you can view page of an HTML page, there is no security 4)There is no way to persist the data

Difference between ASP.Net Website and ASP.Net Web Application? Posted by: Syedshakeer a.)ASP.Net Website (Microsoft Visual Studios default type): i. Local Resource is treated as content based resource, so we can change it and it affects to web ii. Global Resource is treated as embedded resource, So they are compiled into specific languag bin folder.

b.ASP.Net Web Application i.Both Local and Global resource are treated as content based resource, so both are editable. Any change in any type of resource cause whole resource compilation

Difference between Localization and Globalization? Posted by: Syedshakeer Globalization is process of identifying how many resources needs to be localized to adopt a mul support, while Localization is actual process of translating resource to a specific culture. So Lo the part of Globalization.

What is the significance of AutoEventWireUp attribute? Posted by: Syedshakeer Gets or sets a value indicating whether events for ASP.NET pages are automatically connected handling functions.

@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="TestWebApp.WebForm1" The AutoEventWireup attribute may have a value of true or false. When an ASP.NET Web Ap created by using Microsoft Visual Studio .NET, the value of the AutoEventWireup attribute is We can specify the default value of the AutoEventWireup attribute in the following locations: The Machine.config file. The Web.config file. Individual Web Forms (.aspx files). Web User Controls (.ascx files) The value of the AutoEventWireup attribute can be declared in the <pages> section in the Mac file or the Web.config file, as follows

Should we need to dispose the object after use Explicitly or we need to wait for Garbage Collec dispose those object? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Which is the Light (Performance wise) Data control from the following? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. What is the Difference Between string and System.Text.StringBuilder? Posted by: Lakhangarg

System.Text.StringBuilder strTest=new System.Text.StringBuilder(); Strings are immutable. immutable means every time we alter the string a new object is created the performance. while stringBuilder are mutable. so it increase the performance where we nee perform altered, insert and remove operations. But it is not recommended to use StringBuilder small string where you need to perform less operation then use string and in case of large string and more operation use StringBuilder. What is the best state management variable to save the username for particular session? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer. Maximum Data that can be stored in a cookie? Posted by: Lakhangarg NOTE: This is objective type question, Please click question title for correct answer.

How many types of Validation controls are there in ASP.NET? Posted by: Raja There are mainly 5 types of validation controls are there and 1 control is to summarize the vali errors. They are ? RequiredFieldValidator - to check for mandatory field ? RangeValidator - to check for data in the specified range ? RegularExpressionValidator - to check for data in a particular regular expression ? ComapreValidator - to compare two data or data types ? CustomValidator - to attach a custom a control with the help of user defined function ? ValidationSummary - to summarize all validation error. Which of the following does not contain Id and Runat Propertys Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. What is the Default Property of ShowFooter in Gridview Posted by: Syedshakeer NOTE: This is objective type question, Please click question title for correct answer. What is a master page ? Posted by: Syedshakeer

1) A master page provides a framework in which the content of each page on a web site is prese Master pages make it easy to create pages that have a consistent look.

2) The pages that provide the content thats displayed in a master page are called content page 3) The content of each content page is displayed in the master pages content placeholder How do you implement postback with a text box? Posted by: Babu_akkandi Make AutoPostBack property to true

What is Role-Based security? Posted by: Babu_akkandi A role is a named set of principals that have the same privileges with respect to security (such a a manager). A principal can be a member of one or more roles. Therefore, applications can use membership to determine whether a principal is authorized to perform a requested action.

differences between Server-side and Client-side code? Posted by: Babu_akkandi Server side code will process at server side & it will send the result to client. Client side code (ja will execute only at client side.

What are the disadvantages and benefits of view state? Posted by: Babu_akkandi Automatic view-state management is a feature of server controls that enables them to repopula property values on a round trip (without you having to write any code). This feature does impa performance, however, since a server control's view state is passed to and from the server in a h field. You should be aware of when view state helps you and when it hinders your page's perfor What are the different ways you would consider sending data across pages in ASP? Posted by: Babu_akkandi * Session * public properties What method do you use to explicitly kill a users session? Posted by: Babu_akkandi

Abandon()

What is cookie less session? How it works? Posted by: Babu_akkandi By default, ASP.NET will store the session state in the same process that processes the request, does. If cookies are not available, a session can be tracked by adding a session identifier to the U can be enabled by setting the following: <sessionState cookieless="true" /> http://samples.gotdotnet.com/quickstart/aspplus/doc/stateoverview.aspx Difference between ASP Session and ASP.NET Session? Posted by: Babu_akkandi asp.net session supports cookie less session & it can span across multiple servers.

What are server controls? Posted by: Babu_akkandi ASP.NET server controls are components that run on the server and encapsulate user-interfac related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes. Which one is not the correct ASP.NET Version? Posted by: Poster NOTE: This is objective type question, Please click question title for correct answer.

What are the advantages and disadvantages of Cookies? Posted by: Neeks Advantages 1. Cookies do not require any server resources since they are stored on the client. 2. Cookies are easy to implement. 3. You can configure cookies to expire when the browser session ends (session cookies) or they c a specified length of time on the client computer (persistent cookies). Disadvantages 1. Users can delete a cookies. 2. Users browser can refuse cookies,so your code has to anticipate that possibility. 3. Cookies exist as plain text on the client machine and they may pose a possible security risk as open and tamper with cookies.vv

What is Cookie Dictionary? Posted by: Neeks A cookie dictionary is a single cookie object that stores multiple pieces of information. You use property to access and assign new values to the cookie dictionary.

What is the difference between Session Cookies and Persistent Cookies? Posted by: Neeks Persistent Cookies are same as Session Cookies except that, persistent cookies have an expiratio expiration date indicates to the browser that it should write the cookie to the client's hard drive . Keep in mind that because a user can delete cookies from their machine that there is no guara cookie you "drop" on a user machine will be there the next time they visit your site. difference between custom control and user control Posted by: Syedshakeer User control 1) Reusability web page 2) We cant add to toolbox 3) Just drag and drop from solution explorer to page (aspx) 4) U can register user control to. Aspx page by Register tag 5) A separate copy of the control is required in each application 6) Good for static layout 7) Easier to create 8)Not complied into DLL 9) Here page (user page) can be converted as control then We can use as control in aspx Custom controls 1) Reusability of control (or extend functionalities of existing control) 2) We can add toolbox 3) Just drag and drop from toolbox 4) U can register user control to. Aspx page by Register tag 5) A single copy of the control is required in each application 6) Good for dynamics layout 7) Hard to create 8) Compiled in to dll which of the following controls support databinding. Posted by: Syedshakeer

NOTE: This is objective type question, Please click question title for correct answer.

What is the difference between Server.Transfer and Response.Redirect? Posted by: Prakag Both "Server" and "Response" are objects of ASP.NET. Server.Transfer and Response.Redire used to transfer a user from one page to another. But there is an underlying difference. //Usage of Server.Transfer & Response.Redirect Server.Transfer("Page2.aspx"); Response.Redirect("Page2.aspx"); The Response.Redirect statement sends a command back to the browser to request the next pa server. This extra round-trip is often inefficient and unnecessary, but this established standard well. By the time Page2 is requested, Page1 has been flushed from the servers memory and no can be retrieved about it unless the developer explicitly saved the information using some techn session, cookie, application, cache etc.

The more efficient Server.Transfer method simply renders the next page to the browser withou round trip. Variables can stay in scope and Page2 can read properties directly from Page1 beca in memory. This technique would be ideal if it wasnt for the fact that the browser is never noti page has changed. Therefore, the address bar in the browser will still show Page1.aspx even Server.Transfer statement actually caused Page2.aspx to be rendered instead. This may occasio good thing from a security perspective, it often causes problems related to the browser being ou with the server. Say, the user reloads the page, the browser will request Page1.aspx instead of t (Page2.aspx) that they were viewing. In most cases, Response.Redirect and Server.Transfer can interchangeably. But in some cases, efficiency or usability may be the deciding factor in choosin Difference between DataGrid, DataLsit and Repeater? Posted by: Syedshakeer Difference between DataGrid, DataLsit and Repeater? DataGrid: 1) DataGird has a in-built Support for Sort, Filter, and Paging the Data. 2) Each Row in DataGrid is displayed as a row in the table. 3) It has an AutoGenarateColumn Property, which can be set to either True or False. Default property is true. 4) DataGrid has predefined Editing Controls. 5)Following are the DataGrid Data Control Styles:

i. AlternatingItemStyle ii. EditItemStyle iii. FooterStyle iv. HeaderStyle v. ItemStyle vi. SelectedItemStyle vii. PagerStyle

6) Following are the DataGrid Data Control Templates(only supported by the TemplateColum i. HeaderTemplate ii. ItemTemplate iii. EditItemTemplate iv. FooterTemplate

DataList: 1) Support Paging, Sorting and editing but explicitly code to do Paging. 2) It displays the Records in Tabular form. 3) By default the DataList Displays its Data in a HTML .

4) You can specify via the repeat columns how many DataSource records should appear HTML Eg : 5)DataList Doesnot have Predefined Editing Controls. 6) Following are the Data Grid Data Control Styles: i. AlternatingItemStyle ii. EditItemStyle iii. FooterStyle iv. HeaderStyle v. ItemStyle vi. SelectedItemStyle vii. SeparatorStyle

7) Following are DataList Data Control Templates: i. AleternatingItemTemplate ii. EditItemTempalte iii. HeaderTemplate iv. ItemTempalte v. SelectedItemTemplate vi. SeparatorTemplate vii. SelectedItemTemplate viii. FooterTemplate Repeater: 1) It can be used for lightweight and simple report generation. 2) It is used to display a Repeated List of items that are bound to the control. 3) It does not support Paging. 4) Repeater is faster followed by DataList and finally DataGrid.

5) To create a table in a Repeater you must include the begin table tag in the HeaderTemplate, row tag in the ItemTemplate and the end table tag in the FooterTemplate 6)No predefined Styles 7) Following are Repeater Data Control Templates: i. FooterTemplate What is the difference GridView and between DataGrid(Windows)? Posted by: Syedshakeer GridView :

1) GridView Control Enables you to add sorting,pagingand editing capabilities without writing

2)GridView Control Automatically Supports paging by setting the PagerSetting Property.The Setting Property supports four Modles a. Numeric(by default) b. Next Previous c. NumericFirstLast

d. Next PreviousLast 3)It is Used in asp.net 4)GridView Supports RowUpdating and RowUpdated Events. 5)GidView is Capable of Pre-Operations and Post-Operations. 6)GridView Has EditTemplates for this control 7)It has AutoFormat DataGrid(Windows) 1)DataGid Control raises single Event for operations 2)DataGird Supports the SortCommand Events that occur when a column is Soted.

3)DataGrid Supports UpdataCommand Event that occurs when the UpdateButton is clicked fo the grid. 4)DataGrid is used in Windows GUI Application. 5)It doesnot have EditTemplates for this control 6)It doesnot have AutoFormat

Whats a bubbled event ? Posted by: Charugoel When you have a complex control, like DataGrid, writing an event processing routine for each button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the DataGrid event handler to take care of its constituents.

Between Windows Authentication and SQL Server Authentication, which one is trusted and w untrusted? Posted by: Charugoel Windows Authentication is trusted because the username and password are checked with the A Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier pa the transaction. Why only boxed types can be unboxed?

Posted by: Charugoel Unboxing is the process of converting a Reference type variable to Value type and thus allocati on the stack . It happens only to those Reference type variables that have been earlier created b a Value Type , therefore internally they contain a value type , which can be obtained through e casting . For any other Reference type , they dont internally contain a Value type to Unboxed v casting . This is why only boxed types can be unboxed.

Whats the difference between System.String and System.StringBuilder classes? Posted by: Charugoel System.String is immutable; System.StringBuilder was designed with the purpose of having a m string where a variety of operations can be performed.Append Keyword is used in System.Strin but not in System.String.

Hows the DLL Hell problem solved in .NET ? Posted by: Charugoel Assembly versioning allows the application to specify not only the library it needs to run (which available under Win32), but also the version of the assembly.

What is meant by urlencode and urldecode? Posted by: Charugoel urlencode() returns the URL encoded version of the given string. URL coding converts special into % signs followed by two hex digits. For example: urlencode(10.00%) will return 10%2 URL encoded strings are safe to be used as part of URLs. urldecode() returns the URL decoded version of the given string.

What is ViewState ? and how it is managed ? Posted by: Charugoel ASP.NET ViewState is a new kind of state service that developers can use to track UI state on a basis. Internally it uses an an old Web programming trick-roundtripping? state in a hidden for bakes it right into the page-processing framework.It needs less code to write and maintain state Web-based forms. How to check viewstate tampering Posted by: Potluri NOTE: This is objective type question, Please click question title for correct answer. What is State management in ASP.NET?

Posted by: Ashisamk State management is the process by which you maintain state and page information over multi for the same or different pages. There are 2 types State Management:

1. Client Side State Management This stores information on the client's computer by embedding the information into a Web pag resource locator(url), or a cookie. The techniques available to store the state information at the are listed down below:

a. View State Asp.Net uses View State to track the values in the Controls. You can add custom the view state. It is used by the Asp.net page framework to automatically save the values of the each control just prior to rendering to the page. When the page is posted, one of the first tasks by page processing is to restore view state.

b. Control State If you create a custom control that requires view state to work properly, you control state to ensure other developers dont break your control by disabling view state.

c. Hidden fields Like view state, hidden fields store data in an HTML form without displayin user's browser. The data is available only when the form is processed.

d. Cookies Cookies store a value in the user's browser that the browser sends with every page the same server. Cookies are the best way to store state data that must be available for multiple on a web site. e. Query Strings - Query strings store values in the URL that are visible to the user. Use query you want a user to be able to e-mail or instant message state data with a URL.

2. Server Side State Management a. Application State - Application State information is available to all pages, regardless of whic requests a page.

b. Session State Session State information is available to all pages opened by a user during a s

Both application state and session state information is lost when the application restarts. To pe data between application restarts, you can store it using profile properties. Menton the events in page life cycle and explain them. Posted by: Visitravi you can see msdn for answer.

How will you upload a file to IIS in Asp and how will you do the same in ASP.net? Posted by: Rohitshah First of all, we need a HTML server control to allow the user to select the file. This is nothing b old <input tag, with the type set to File, such as <input type=file id=myFile runat=server />. T you the textbox and a browse button. Once you have this, the user can select any file from their (or even from a network). Then, in the Server side, we need the following line to save the file to Server. myFile.PostedFile.SaveAs ("DestinationPath") Note: The Form should have the following ENC Type <form enctype="multipart/form-data" runat="server"> What does WSDL stand for? Posted by: Rohitshah Web Services Description Language.

What Is The Difference Between ViewState and Session...? Posted by: Rohitshah ViewState persist the values of controls of particular page in the client (browser) when post bac done. When user requests another page previous page data no longer available.

SessionState persist the data of particular user in the server. This data available till user close t or session time completes.

Can you give an example of what might be best suited to place in the Application_Start and Ses subroutines? Posted by: Rohitshah This is where you can set the specific variables for the Application and Session objects.

Difference between DropDownList.Items.Add and DropDownList.Items.Insert method Posted by: SheoNArayan DropDownList.Items.Add method allows you to add new ListItem into the DropDownList. Thi added as the last item of the DropDownList. dropDownList.Items.Add(new ListItem("Default Panel", "0"));

DropDownList.Items.Insert method allows you to specify the index of the item within the Drop

where you want to insert the ListItem. dropDownList.Items.Insert(0, new ListItem("Default Panel", "0")); Here Default Value will be added as the first item in the DropDown. What does the "EnableViewState" property do? Why would I want it on or off? Posted by: Rohitshah It enables the viewstate on the page. It allows the page to save the users input on a form.

Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process Posted by: Rohitshah inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other thing ASP.NET request is received (usually a file with .aspx extension),the ISAPI filter aspnet_isapi.d of it by passing the request tothe actual worker process aspnet_wp.exe.

How to convert an ArrayList into an Array? Posted by: Raja Lets say you have myPersonList as an ArrayList that has Person object. If you want to convert ArrayList into array of your Person object, write like this. Person[] personArray = (Person[])myPersonList.ToArray(typeof(Person)); Here you need to cast the object into its type. How many types of cookies are there in ASP.NET ? Posted by: Majith 1. Single valued request.cookies(dotnetfunda)=Sheo 2. Multi valued request.cookies(donetfunda)(uname)=MAJITH? What event handlers can I include in Global.asax?

Posted by: Majith Application_Start,Application_End, Application_AcquireRequestState, Application_Authentic Application_AuthorizeRequest, Application_BeginRequest, Application_Disposed, Application_EndRequest, Application_Error, Application_PostRequestHandlerExecute, Application_PreRequestHandlerExecute, Application_PreSendRequestContent, Application_PreSendRequestHeaders, Application_ReleaseRequestState, Application_ResolveRequestCache, Application_UpdateReq Session_Start,Session_End

What is Code group? Posted by: Majith Code groups represent collections of code and each code group has an associated set of permiss

What is CAS? Posted by: Majith CAS is the part of the .NET security model that determines whether or not a piece of code is al and what resources it can use when it is running. For example, it is CAS that will prevent a .NE applet from formatting your hard disk. How does CAS work? The CAS security policy revolve key concepts - code groups and permissions. Each .NET assembly is a member of a particular c and each code group is granted the permissions specified in a named permission set. For examp default security policy, a control downloaded from a web site belongs to the 'Zone - Internet' co which adheres to the permissions defined by the 'Internet' named permission set. (Naturally th named permission set represents a very restrictive range of permissions.) What is smart navigation? Posted by: Majith * It eliminates the flash caused during navigation * It persists element focus during postbacks * It persists scroll position during postbacks between pages * It retains the lasts page information in the history of the browser

What is different between WebUserControl and in WebCustomControl ? Posted by: Majith Web user controls :- Web User Control is Easier to create and another thing is that its support for users who use a visual design tool one gud thing is that its contains static layout one more th seprate copy is required for each application. Web custom controls:- Web Custom Control is typical to create and gud for dynamic layout an thing is it have full tool support for user and a single copy of control is required because it is pl Global Assembly cache.

Whats a bubbled event? Posted by: Majith When you have a complex control, like DataGrid, writing an event processing routine for each button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the DataGrid event handler to take care of its constituents. Whats the difference between Response.Write() and Response.Output.Write()? Posted by: Majith Response.Output.Write() allows you to write formatted output.

How to convert an Array into an ArrayList? Posted by: Raja Lets say you have array of Person object and you are getting an it from LoadPersons() method object like this Person[] myPersonArray = myPerson.LoadPersons(); Now, if you want to convert above array into an ArrayList just write like this ArrayList myPersonList = ArrayList.Adapter(myPersonArray ); How to get the authentication mode from web.config file programmatically at runtime? Posted by: Raja Write following code.

System.Web.Configuration.AuthenticationSection section =

(AuthenticationSection)WebConfigurationManager.GetSection("system.web/authentica Label1.Text = section.Mode.ToString(); You will get the authentication mode set in your web.config file. How to load a user control dynamically in runtime? Posted by: Raja

Write following code. Control c = (Control)Page.LoadControl("~/usercontrol/MyUserControl.ascx");

Page.Form.Controls.Add(c);

Instead of adding this user control into the Form you can add into Panel too so that you can po your desired location. In that case you need to delcare a panel in the .aspx page and write follow Panel1.Controls.Add(c); What are the validation controls in asp.net? Posted by: Poster There are 5 validation control in asp.net 1. RequiredFieldValidator 2. RangeValidator 3. RegularExpressionValidator 4. CompareValidator 5. CustomValidator

ValidationSummary is not a validation control but a control that displays summary of all error while validating the page. Which two properties are on every validation control? Posted by: Poster We have two common properties for every validation controls 1. ControlToValidate 2. ErrorMessage. What method do you use to explicitly kill a user s session? Posted by: Poster Session.Abandon

What event handlers can I include in Global.asax? Posted by: Poster Application_Start, Application_End, Application_AcquireRequestState, Application_AuthenticateRequest, Application_AuthorizeRequest, Application_BeginRequest, Application_Disposed, Application_EndRequest, Application_Error, Application_PostRequestHandlerExecute, Application_PreRequestHandlerExecute, Application_PreSendRequestContent, Application_PreSendRequestHeaders, Application_ReleaseRequestState, Application_ResolveRequestCache, Application_UpdateRequestCache, Session_Start, Session_End

You can optionally include "On" in any of method names. For example, you can name a Begin event handler.Application_BeginRequest or Application_OnBeginRequest.You can also includ handlers in Global.asax for events fired by custom HTTP modules.Note that not all of the even make sense for Web Services (they're designed for ASP.NET applications in general, whereas . Web Services are specialized instances of an ASP.NET app). For example, the Application_AuthenticateRequest and Application_AuthorizeRequest events are designed to be ASP.NET Forms authentication.

What is the difference between Server.Transfer and Response.Redirect? Why would I choose o other? Posted by: Poster In earlier versions of IIS, if we wanted to send a user to a new Web page, the only option we ha Response.Redirect. While this method does accomplish our goal, it has several important draw biggest problem is that this method causes each page to be treated as a separate transaction. Be making it difficult to maintain your transactional integrity, Response.Redirect introduces some headaches. First, it prevents good encapsulation of code. Second, you lose access to all of the pr the Request object. Sure, there are workarounds, but they're difficult. Finally, Response.Redir necessitates a round trip to the client, which, on high-volume sites, causes scalability problems. As you might suspect, Server.Transfer fixes all of these problems. It does this by performing th

the server without requiring a roundtrip to the client.

Explain the differences between Server-side and Client-side code? Posted by: Poster Server side scripting means that all the script will be executed by the server and interpreted as doesn't have some of the functionality like sockets, uploading, etc. For these you have to make a 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 sid usually done in VBScript or JavaScript. Download time, browser compatibility, and visible cod JavaScript and VBScript code is included in the HTML page, then anyone can see the code by page source. Also a possible security hazards for the client computer

What does AspCompat="true" mean and when should I use it? Posted by: Poster AspCompat is an aid in migrating ASP pages to ASPX pages. It defaults to false but should be any ASPX file that creates apartment-threaded COM objects--that is, COM objects registered ThreadingModel=Apartment. That includes all COM objects written with Visual Basic 6.0. Asp should also be set to true (regardless of threading model) if the page creates COM objects that intrinsic ASP objects such as Request and Response. The following directive sets AspCompat to <%@ Page AspCompat="true" %>

Setting AspCompat to true does two things. First, it makes intrinsic ASP objects available to th components by placing unmanaged wrappers around the equivalent ASP.NET objects. Second the performance of calls that the page places to apartment- threaded COM objects by ensuring page (actually, the thread that processes the request for the page) and the COM objects it creat apartment. AspCompat="true" forces ASP.NET request threads into single-threaded apartme If those threads create COM objects marked ThreadingModel=Apartment, then the objects ar the same STAs as the threads that created them. Without AspCompat="true," request threads multithreaded apartment (MTA) and each call to an STA-based COM object incurs a perform when it's marshaled across apartment boundaries.

Do not set AspCompat to true if your page uses no COM objects or if it uses COM objects that ASP intrinsic objects and that are registered ThreadingModel=Free or ThreadingModel=Both

Is it possible to prevent a browser from caching an ASPX page? Posted by: Poster Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cac as demonstrated here:

<%@ Page Language="C#" %> <html> <body> <% Response.Cache.SetNoStore (); Response.Write (DateTime.Now.ToLongTimeString ()); %> </body> </html>

SetNoStore works by returning a Cache-Control: private, no-store header in the HTTP respon example, it prevents caching of a Web page that shows the current time. Where does the Web page belong in the .NET Framework class hierarchy? Posted by: Poster NOTE: This is objective type question, Please click question title for correct answer.

Whats the use of "GLOBAL.ASAX" file? Posted by: Sheonarayan Global.asax is a file that resides in the root directory of your application. It is inaccessible over is used by the ASP.NET application if it is there. It is a collection of event handlers that you can change and set settings in your site. The events can come from one of two places - The HTTPAp object and any HTTPModule object that is specified in web.confg or machine.config. Whats a SESSION and APPLICATION object ? Posted by: Sheonarayan Sessioin object is used to store user specific data into server memory. Session["MyData"] = "Store This data"; Application object is used to store application specific data into server memory.

Application["MyData"] = "Global value";

What are user controls and custom controls? Posted by: Poster Custom controls: A control authored by a user or a third-party software vendor that does not b the .NET Framework class library. This is a generic term that includes user controls. A custom control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Fo applications.

User Controls: In ASP.NET: A user-authored server control that enables an ASP.NET page to as a server control. An ASP.NET user control is authored declaratively and persisted as a text an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class from the System.Web.UI.UserControl class. Where do you add an event handler? Posted by: Poster It's the Attributes property, the Add function inside that property. e.g. btnSubmit.Attributes.Add("onMouseOver","someClientCode();")

What are the different types of caching? Posted by: Poster Caching is a technique widely used in computing to increase performance by keeping frequentl or expensive data in memory. In context of web application, caching is used to retain the pages across HTTP requests and reuse them without the expense of recreating them.ASP.NET has 3 caching strategiesOutput CachingFragment CachingData

CachingOutput Caching: Caches the dynamic output generated by a request. Some times it is u cache the output of a website even for a minute, which will result in a better performance. For whole page the page should have OutputCache directive.<%@ OutputCache Duration="60" VaryByParam="state" %>

Fragment Caching: Caches the portion of the page generated by the request. Some times it is n to cache the entire page, in such cases we can cache a portion of page<%@ OutputCache Dura VaryByParam="CategoryID;SelectedID"%>

Data Caching: Caches the objects programmatically. For data caching asp.net provides a cache eg: cache["States"] = dsStates;

What are different types of directives in .NET? Posted by: Poster @Page: Defines page-specific attributes used by the ASP.NET page parser and compiler. Can b only in .aspx files <%@ Page AspCompat="TRUE" language="C#" %> @Control: Defines control-specific attributes used by the ASP.NET page parser and compiler. included only in .ascx files. <%@ Control Language="VB" EnableViewState="false" %>

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

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

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

@Assembly: Links an assembly to the current page during compilation, making all the assemb and interfaces available for use on the page. <%@ Assembly Name="MyAssembly" %><%@ Src="MySource.vb" %>

@OutputCache: Declaratively controls the output caching policies of an ASP.NET page or a us contained in a page<%@ OutputCache Duration="#ofseconds" Location="Any | Client | Down Server | None" Shared="True | False" VaryByControl="controlname" VaryByCustom="brow customstring" VaryByHeader="headers" VaryByParam="parametername" %>

@Reference: Declaratively indicates that another user control or page source file should be dyn compiled and linked against the page in which this directive is declared.

Can a user browsing my Web site read my Web.config or Global.asax files? Posted by: Poster No. The <HTTPHANDLERS>section of Machine.config, which holds the master configuration ASP.NET, contains entries that map ASAX files, CONFIG files, and selected other file types to handler named HttpForbiddenHandler, which fails attempts to retrieve the associated file. You it by editing Machine.config or including an section in a local Web.config file.

What's the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScrip Posted by: Poster RegisterClientScriptBlock is for returning blocks of client-side script containing functions. RegisterStartupScript is for returning blocks of client-script not packaged in functions-in other

that's to execute when the page is loaded. The latter positions script blocks near the end of the d elements on the page that the script interacts are loaded before the script runs.<%@ Reference Control="MyControl.ascx" %> Do session use cookies? Posted by: Sheonarayan No, session is stored in server memory. What are the various ways of authentication techniques in ASP.NET? Posted by: Sheonarayan ASP.NET provides three ways to authenticate a user: * Windows authentication, * Forms authentication, and * Passport authentication How to improve performance of web page in asp.net? Posted by: Raja Minimize the use of ViewState, Session, Turn off tracing etc. For more see http://dotnetfunda.com/articles/article45.aspx

What is the difference between asp:Label and asp:Literal control? Posted by: Raja asp:Label control asp:Label control is used to write text on the page with different formatting options like bold, i underlined etc. For more on asp:Label see http://dotnetfunda.com/tutorials/controls/label.aspx

asp:Literal control Literal control is used to write simple text on the page, you can use server side formatting optio italic, underlined. For more on asp:Literal see http://dotnetfunda.com/tutorials/controls/literal.aspx What is HttpHandler? Posted by: Raja HttpHanlder is the low level Request and Response API to service incoming Http requests. All

implement the IHttpHandler interface. There is no need to use any extra namespace to use it as in the System.Web namespace. Handlers are somewhat analogous to Internet Server Applicatio Programming Interface (ISAPI) extensions.

Each incoming HTTP request received by ASP.NET is ultimately processed by a specific instan that implements IHTTPHanlder. IHttpHanlderFactory provides the infrastructure that handle resolution of URL requests to IHttpHanlder instances. In addition to the default IHttpHandler classes provided by ASP.NET, developers can optionally create and register factories to suppor request resolution.

What is EnableViewStateMAC? Posted by: Raja When EnableViewStateMAC is true for a page, the encoded and encrypted viewstate is checke that it has not been tempered with on the client machine.

A EnableViewStateMAC is encoded version of the hidden variable that a page's viewstate is pe when sent to the browser. How to copy items from one DropDownList control to another DropDownList control. Posted by: Raja Write following coder

foreach (ListItem item in drop1.Items) { drop2.Items.Add(item); }

Where drop1 is the id of first DropDownList and drop2 is the id of second DropDownList cont

How to make sure that despite using validation control on your.aspx page, your page is valid? o validate the page in the server side?

Posted by: Raja use Page.IsValid method, this revalidate your data server side against each Validation control u

What is the lifespan for items stored in ViewState? Posted by: Raja Item stored in ViewState exist for the life of the current page. This includes postbacks (to the sa

Explain what a diffgram is, and a good use for one? Posted by: Raja The DiffGram is one of the two XML formats that you can use to render DataSet object conten A good use is reading database data to an XML file to be sent to a Web Service. what is the control for which by default post back is enabled(true) Posted by: Ragha NOTE: This is objective type question, Please click question title for correct answer. How do you retrieve username in case of Windows Authentication? Posted by: Raja System.Environment.UserName Types of Configuration files and their difference? Posted by: Raja 1. Application level config = Web.config. 2. Machine level config = Machine.config. How can you manage server-side state? Posted by: Raja NOTE: This is objective type question, Please click question title for correct answer. How can you manage client-side state? Posted by: Raja NOTE: This is objective type question, Please click question title for correct answer. Which is stateless Posted by: Raja

NOTE: This is objective type question, Please click question title for correct answer.

Difference between DataSet and DataReader Posted by: Raja DataReader =========== DataReader is like a forward only recordset. It fetches one row at a time so very less network c to DataSet(Fethces all the rows at a time). DataReader is readonly so we can't do any transactio DataReader will be the best choice where we need to show the data to the user which requires n transaction. As DataReader is forward only so we can't fetch data randomly. .NET Data Provid optimizes the datareader to handle huge amount of data.

DataSet ======= DataSet is an in memory representation of a collection of Database objects including tables of a database schemas. DataSet is always a bulky object that requires a lot of memory space compare to DataReader. W that the DataSet is a small database because it stores the schema and data in the application me DataSet fetches all data from the datasource at a time to its memory area. So we can traverse th object to get the required data like querying database. What data types do the asp:RangeValidator control support? Posted by: Webmaster NOTE: This is objective type question, Please click question title for correct answer.

What is ViewState? Posted by: Webmaster ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. Vi transported to the client and back to the server, and is not stored on the server or any other ext source. ViewState is used to retain the state of server-side objects between postabacks. What is custom tag in web.config file? Posted by: Raja Custom tag allows you to create your own tag and specify key value pair for it. What is difference between Trace and Debug? Posted by: Raja Use Debug class to debug builds Use Trace class for both debug and release builds.

What is ASP.NET 2.0 Page Life Cycle? Posted by: Raja Main Events ============= 1. OnPreInit 2. OnInit 3. OnInitComplete 4. LoadViewState 5. OnPreLoad 6. OnLoad 7. RaisePostBackEvent 8. OnLoadComplete 9. OnPreRender 10. OnPreRenderComplete 11. SaveViewState 12. OnRender 13. OnUnload Detailed Events ============ 1. Constructor 2. Construct 3. TestDeviceFilter 4. AddParsedSubObject 5. DeterminePostBackMode 6. OnPreInit 7. LoadPersonalizationData 8. InitializeThemes 9. OnInit 10. ApplyControlSkin 11. ApplyPersonalization 12. OnInitComplete 13. LoadPageStateFromPersistenceMedium 14. LoadControlState 15. LoadViewState 16. ProcessPostData1 17. OnPreLoad 18. OnLoad 19. ProcessPostData2 20. RaiseChangedEvents 21. RaisePostBackEvent

22. OnLoadComplete 23. OnPreRender 24. OnPreRenderComplete 25. SavePersonalizationData 26. SaveControlState 27. SaveViewState 28. SavePageStateToPersistenceMedium 29. Render 30. OnUnload

54 ASP and ASP.NET questions


By admin | December 21, 2006

1. 2.
3.

Explain the life cycle of an ASP .NET page. Explain the .NET architecture. What are object-oriented concepts? How do you create multiple inheritance in c# and .NET? When is web.config called? How many weg.configs can an application have? How do you set language in weg.config? What does connection string consist of? Where do you store connection string? What is abstract class? What is difference between interface inhertance and class inheritance? What are the collection classes? What are the types of threading models? What inheritance does VB.NET support? What is a runtime host? Describe the techniques for optimizing your application? Differences between application and session What is web application virtual directory? Differences between Active.exe and Dll Connection pooling in MTS? If cookies is disabled in client browser, will session tracking work? How do you make your site SSL-enabled? Will the following code execute successfully: response.write(value of i=+i); What are the provides available with VB.NET?

4.
5. 6. 7. 8. 9. 10. 11. 12. 13.

14.
15. 16. 17. 18. 19. 20. 21. 22. 23.

24.

25. What is a Process, Sesion and Cookie? 26. What are Abstract base classes? 27. What are the Difference between bstract base classes and Abstrat classes 28. What are interface in .NET?

29. How is Polymorphism supports in .NET? 30. What are the 2 types of polymorphism supports in .NET?
31. Types of compatibilities and explain them. 32. What is aggregative? How can it be implements in .NET?

33. Difference between COM components and .NET components?how to register it

34. Difference between early binding and late binding? 35. ASP.NET OBJECTS?

36. Asp.NET life cycle? When request mode


37. 38. 39. 40. Explain ADO and its objects. What is side by side execution? Explain serialization? Explain a class access specifiers and method acess specifiers. What is the difference between overloading and overriding ? how can this be .NET

41.

42. Explain virtual function and its usage. 43. How do you implement inhetance in .NET? 44. If I want to override a method 1 of class A and this class B then how do you declared 45. Explain friend and protected friend. 46. Explain multiple and multi_level inheritance in .NET? 47. Name all kind of access specifiers for a class and for methods? 48. On ODP.NET 49. 50. 51. 52. What is non-derterministic finalization? What is isPostback property? What is dictionary base class? How can a class be extended and how is this mechanism difff from that of implementation an interface? What are indexes .NET?

53. 54. How can indexes be implemented in .NET?

You might also like