ASP.NET 2.0

  Home  Microsoft .Net Technologies  ASP.NET 2.0


“ASP.NET 2.0 Interview Questions and Answers will guide us that ASP.NET 2.0 introduced the concept of master pages, which allow for template based page development. A web application can have one or more master pages, which, beginning with ASP.NET 3.5, can be nested. Master templates have place holder controls, called ContentPlaceHolders to denote where the dynamic content goes, as well as HTML and JavaScript shared across child pages. Learn more with ASP.NET 2.0 Interview Questions with Answers”



87 ASP.NET 2.0 Questions And Answers

81⟩ What is PreProcessor in .NET and type, where it use?

The pre-processing directives provide the ability to conditionally skip sections of source files, to report error and warning conditions, and to delineate distinct regions of source code. The term "pre-processing directives" is used only for consistency with the C and C++ programming languages. In C#, there is no separate pre-processing step; pre-processing directives are processed as part of the lexical analysis phase.

A preprocessor directive must be the only instruction on a line. Preprocessing directives are lines in your program that start with `#'. Whitespace is allowed before and after the `#'. The `#' is followed by an identifier that is the directive name. For example, `#define' is the directive

Types are:

#if, #else, #elif, #endif, #define, #undef, #warning, #error, #line, #region, #endregion

They are used for:

Conditional compilation

Line control

Error and Warning reporting

For example u can refere the MS site ...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html/vclrfcsharpspec_2_5_4.asp

 151 views

82⟩ What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

Server.Transfer is used when redirecting the webpage with in the same applicationwhereasResponse.Redirect is applicabletowards the redirection of webpage between 2 applications

Response.Redirect will instruct browser to call a particular webpage.This will increase one request and one response between the client and server.

 151 views

84⟩ Name some ASP Objects?

1. Session Object

2. Application Object

3. Server Object

4. Request Object

5. Response Object

6. Object Context

7. Error Object

 151 views

86⟩ In A Page I have gridview with Options of select and delete using hyperlink when i am selecting any one of then it has to open another page how can it?

You can have template column for select and delete instead of the databound column. In which you can mention the destination page where you need to navigate.

Using RowDataBound event, you can add attribute to the select and delete hyperlink like:

e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction()")

e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction('"& If any argument &"')").

 159 views