ASP.NET 2.0 Interview Preparation Guide
Download PDF

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:

Table of Contents

ASP.NET 2.0 Interview Questions and Answers
ASP.NET 2.0 Interview Questions and Answers

1 :: How to rename a table using sql queries?

This done by

exec sp_rename 'oldTableName' , 'newTableName'

Use server side for secure validation. Use client side for fast,user friendly validations.

Execute sp_rename 'oldtablename', 'newtableaname'

2 :: Can a .NET web application consume Java web service?

Yeah Offcourse.Actually Webservices are independent to language. it depends on WSDL and SOAP. so any one can develope the Webservices anddisclose the wsdl and users can cosume the webservices.wsdl and soap both are xml based.. and all languages having xml parsing capability and access to http protocol will be able to work with Webservices

3 :: How many types of cookies are available in asp?

There are 2 types of cookies

Persistent and Non-persistent


there are 2 types they are
1. inmemory cookies
2. persistent cookies

4 :: Explain How is a property designated as read-only?

Using Get Accessor

Public ReadOnly property item() as integer Get() Return.item End Get End Property

5 :: Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?

DisplayMember and ValueMember Properties need to be set.

DataTextField and DataValueField Property neeeds to be set

6 :: What tags do you need to add within the asp: datagrid tags to bind columns manually?

<asp:TemplateColumn>
<HeaderTemplate >
Somename
</HeaderTemplate>
<ItemTemplate>

<%# DataBinder.Eval(Container, "DataItem.columnname") %>
</ItemTemplate>

</asp:TemplateColumn>

8 :: Explain What does WSDL stand for?

Web Services Description Language

9 :: What is the transport protocol you use to call a Web service SOAP?

Web service use only three types of protocal. first HTTP-GET,HTTP-POST and SOAP.


Web Services Description Language

11 :: What is the standard you use to wrap up a call to a Web service?

We use Soap standard to wrap calls to web service.Soap stands for Simple Object Access Protocol

13 :: How do you remove duplicates without using remove duplicate stage?

In the target make the column as the key column and run the job.


delete table tablename where rowid not in Select * from tablename group by column name

14 :: can u explain one critical mapping?
performance issue which one is better? whether connected lookup tranformation or unconnected one?

It depends on your data and the type of operation your doing.

If you need to calculate a value for all the rows or for the maximum rows coming out of the source then go for a connected lookup.Or,if it is not so then go for unconnectd lookup.Specially in conditional case like,we have to get value for a field 'customer' from order tabel or from customer_data table,on the basis of following rule:

If customer_name is null then ,customer=customer_data.ustomer_Id

otherwise

customer=order.customer_name.

So in this case we will go for unconnected lookup

15 :: What is Difference between DataList and GridView?

Gridview can display based on various colums avl in an single query or table. Also can customize it while can sort, edit, delete, insert. Datalist is a data bound list control that displays items using templates. Mainly it is all control bound.

DataList is using to list of all data in tree structure GridView is using to list of all value in table format

16 :: What is different in .Net 1.1 and .Net 2.0?

The main difference is that we can add more control over 1.1 for ex we can do master page,themes and generic classes we use 2.0 it can be comes for to add gridview

Concept of partial classes in .NET 2.0

17 :: Which two properties are on every validation control?

ControlToValidate property and Text property

This is done explicitly by adding the below code Response.Cookies("Name") = "myCookie"
Response.Cookies("Name").Expires = DateAdd("m", 1, Now());

ErrorMessage and ControlToValidate

18 :: How do you turn off cookies for one page in your site?

By setting the Cookie.Discard property false

cookie.discard=false

20 :: In what order do the events of an ASPX page execute. As a developer is it important to understand these events?

1. Object Initialization

2. Load Viewstate Data

3. LoadPostData Processes Postback Data

4. Object Load

5. Raise PostBack Change Events

6. Process Client-Side PostBack Event

7. Prerender the Objects

8. ViewState Saved

9. Render To HTML

10. Disposal

21 :: Whats MSIL, and why should my developers need an appreciation of it if at all?

MSIL supports OO programming, so we can have a class which has public and private methods. The entry point of the program needs to be specified. In fact it doesn't really matter whether the method is called Mam or Dad. The only thing that matters here is that .entrypoint is specified inside the method. MSIL programs are compiled with ilasm compiler. Since we are writing a managed assembly code, we have to make sure that no variables are allocated in memory when the program goes out of scope. Here is a more complicated program that, once again, does not do anything but has some dataThe sample MSIL program.method static void main(){ .entrypoint .maxstack 1 ldstr "Hello world!" call void [mscorlib]System.Console::WriteLine(string) ret}

22 :: How would you get ASP.NET running in Apache web servers - why would you even do this?

The mod_mono Apache module is used to run ASP.NET applications within the Apache (http://httpd.apache.org) web server. Mod_mono is available from (http://www.mono-project.com/Downloads).XSP is a standalone web server written in C# that can be used to run your ASP.NET applications. XSP works under both the Mono and Microsoft runtimes and the code is available from(http://www.mono-project.com/Downloads).

23 :: Describe session handling in a webfarm, how does it work and what are the > limits?

State Server is used for handling sessions in a web farm. In a web farm, make sure you have the same in all your web servers. Also, make sure your objects are serializable. For session state to be maintained across different web servers in the web farm, the Application Path of the website (For example LMW3SVC2) in the IIS Metabase should be identical in all the web servers in the web farm

24 :: What are the disadvantages of viewstate/what are the benefits?

Viewstate has lots of advantages and as well as disadvantages, so you need to weigh carefully before making the decision to use it. As view state doesnt require any server resources for its operation. It is passed to the client during every postback as an hidden element. Since it is added with every page, it adds few Kbytes to the page. This effects the loading of the page in the client. Other main problem with Viewstate is, since it is passed as plain text to the client. Anybody can tamper this value, because of this you shouldnt store any important data in the viewstate. View state is one of the most important features of ASP.NET, not so much because of its technical relevance, but more because it makes the magic of the Web Forms model possible. However, if used carelessly, view state can easily become a burden. Although ViewState is freely accessible in a hidden field called __VIEWSTATE, the view state information is not clear text. By default, a machine-specific authentication code is calculated on the data and appended to the view state string. The resulting text is then Base64 encoded only, but not encrypted. In order to make the view state more secure, the ASP.NET @Page directive supports an attribute called EnableViewStateMac whose only purpose is detecting any possible attempt at corrupting original data.

25 :: Where would you use an iHTTPModule, and what are the limitations of any?

IHttpModule is used when u want to add u r own module or extra module so that when u request u r module also gets called.First and foremost httpmodules are used when u make request for a page.While processing the page some modules gets called.Some example modules are security module etc.If u want add a module to be used when processing request u add/implement ihhtp moduleok "Happy Programming"