Home / Dot Net / ASP.NET Interview Question Part-2

ASP.NET Interview Question Part-2

1) How does the cookies work in asp.net?
When a cookie is created it will be stored in the user’s hard disk. When the user visits a site the next time the browser sends all the cookies to the server.

2) What is the difference between Dataset. clone() and Dataset.copy()?
Dataset.clone() is to create new instance of the same object. It copies only structure
Dataset.copy() function helps to copy the content of data without creating instance to another object. It copy both structure and data.

3) Why do we bind the data in Web-application not in the Windows-application?
Databind converts webserver controls into HTML. Since the browser can understand HTML, java script and css.

4) What is Ispostback method in ASP. Net?
It is a property that indicates the value whether the page is being loaded in request of the user.

5) How can we use pointers in ASP.Net?
Pointers can be used in ASP.NET by specifying within the unsafe keyword. Instead of pointers can use reference variable.

6) What is the difference between EVENTS and FUNCTIONS?
Action done to an object is represented by event. Function represents an action done by the object itself.

7) What are the difference between ASP and ASP.NET?
* ASP.NET supports OOPS concept whereas ASP is procedure oriented.
* Late binding presented in ASP.NET
* ASP does not support disconnected architecture whereas ASP.NET supports.

8) What is the difference between ASP.NET and .NET Remoting?
ASP.NET can be accessed using HTML while .NET remoting can be accessed using any protocol. ASP.NET is easy to create whereas .NET remoting is a complex program.

9) What is .NET frame work?
.NET frame work consist of two components:-
* The common language runtime
* NET Framework class library .
.NET framework is an environment provides memory and theory management and also provide platform and language independence.

10) What is CLR?
CLR stands Common language Runtime. Runtime is to execute the program and not develop it.

11) Is string a value type or a reference type?
String is reference type, it is commonly misunderstand as value type. This is because since they are immutable it is assumed to be value type.

12)What is the characteristic of string?
It’s of reference type
Contains null
Overloads == operator

13) what is .NET Partial Classes?
Partial type class is defined using the keyword partial
We can keep all properties related to Employee in one Employee Partial Class.
We can keep all Methods related to Employee in one Employee Partial Class.
We can keep all constants and fields related to Employee in one Employee
Partial Class and so on.

14) How we can set Different levels of Authentication in .Net?
Different levels in authentication are
·Form authentication
·Window authentication
·Passport authentication.

15) How can you provide an alternating color scheme in a Repeater control?
Alternating color scheme can be used in repeater control using AlternatingItemTemplate.

16) What is Forms authentication?
Enables you to identify users with a custom database such as an ASP.NET membership database. Alternatively you can implement your own custom database. Once authenticated you can reference the roles the user is in to restrict access to portions of your Web site.

17) How to alter the rows in a datagrid?
You can use DataGrid’s OnItemCreated and OnItemDataBound events. OnItemCreated event is fired once a row is created but the values are not yet binded.
OnItemDataBound will fire for every row that is bounded. You can get the values here for each column in the row. Depending on you requirement you can use either of these events

18) Name two properties common in every validation control?

Two properties common in every validation control are
·ControlToValidate property
·Text property

19) How to manage state in ASP.NET?

Session state, application state and view state is used to manage state in ASP.NET.

20) What does WSDL stand for?
Web Services Description Language.

21) Where are the resource files declared?
Resources file are declared in app_globalresources.

22) How a grid can be made editable int ASP.Net? How to Access a particular cell of Grid?

to make the grid editable
public void bind() { string str select * from Customer ; OleDbDataAdapter da new OleDbDataAdapter(str con);
DataSet ds new DataSet();
da.Fill(ds); dg.DataSource ds;// this reference is used to identify keys in grid
dg.DataKeyField CustID ;

then create an event for grid!for update edit deleteprivate
void dg_EditCommand(object source System.Web.UI.WebControls.DataGridCommandEventArgs e)
{ dg.EditItemIndex e.Item.ItemIndex; bind(); // this value is used to mention the respective row of grid idval dg.DataKeys[(int)e.Item.ItemIndex].ToString(); }
23) What do you mean by authentication and authorization?
Authentication is the process of validating a user on the credentials (username and password) and authorization performs after authentication. After Authentication a user will be verified for performing the various tasks, It access is limited it is known as authorization.

24)what is the difference between TransferRequest and Transfer method?
Transfer: Terminates execution of the current page and starts execution of provided URL.
TransferRequest: Performs an asynchronous execution of the provided URL.

25) what are the different properties of Object Oriented Systems?
* It supports complex data types
* inheritance
* encapsulation of data
* extensibility of existing data types and classes



About admin

Check Also

Latest Book Marking List 2017

S.No. High PR Social Bookmarking Websites Lists Google PR Alexa MozRank Moz PA 2 www.google.com/bookmarks …