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

41⟩ How Dataadapter.fill works?

Data Adapter act as amiddleman between the dataset and data Base. The fill method automatically open the connection and when the dataset is filled properly then the coonection is closed. This method fetch the data from the database

 194 views

43⟩ How do we Sort the data from a Dataset?

Sorting is similar to filtering, in that you specify a sort expression. A typical sort expression is simply the name of the column to sort by. For example, to sort by the OrderDate column, you specify the sort expression OrderDate. However, you can sort by the value of any expression, including calculated values. If you call a table's Select method, you pass the sort expression as a parameter. If you are using data views, you specify the sort expression as the value of the view's "Sort" property.EX:' Visual BasicDim filterExp As String = "Status = 'Active'"Dim sortExp As String = "City"Dim drarray() As DataRowDim i As Integerdrarray = dataSet1.Customers.Select(filterExp, sortExp, DataViewRowState.CurrentRows)For i = 0 To (drarray.Length - 1) listBox1.Items.Add( drarray(i)("City").ToString )Next// C#string filterExp = "Status = 'Active'";string sortExp = "City";DataRow[] drarray;drarray = dataSet1.Customers.Select(filterExp, sortExp, DataViewRowState.CurrentRows);for (int i=0; i < drarray.Length; i++){ listBox1.Items.Add(drarray[i]["City"].ToString());}

 195 views

44⟩ Diff between Web User Control and Web Custom Control?

Web user controls:1. Easier to create 2. Limited support for consumers who use a visual design tool 3. A separate copy of the control is required in each application 4. Cannot be added to the Toolbox in Visual Studio 5. Good for static layout Web Custom Controls:1. Harder to create2. Full visual design tool support for consumers3. Only a single copy of the control is required, in the global assembly cache4. Can be added to the Toolbox in Visual Studio5. Good for dynamic layout

 168 views

45⟩ What is diff. between ASP State Management and ASP.NET State Management?(Imp) How can we pass info between 2 asp.net pages?

In Distributed network architecture ASP has only one Type of Session Management which can be expressed as InProcess Session State, Where as in .NET architecture ASP.NET Session Management can be done is different ways as 1. In-Process Session Management2. Out-Process Session Management3. Sql-Server Session ManagementIn In-Process Session Management both the Application and the Session will run under the Same Process, where as in Out-Process Session Management Application and the Session will run in different processes. Advantage of Out-Process is that event though the Application is Restared due to any reason the Sessions Assosiated with that application will not be destructed but where as in In-Process Session Management the Session State will be Lost along with the Application.In Sql-Server Session Management, the Session is Maintained in SQLSERVER Database.

 209 views

46⟩ What r the ASP.NET list controls and diff. between them?

ASP.NET List controls ==> There are 3 . 1. DropDownList, 2. ListBox and 3.HTMLSelect.1. System.Web.UI.WebControls.DropDownListthis control renders a drop-down list in the page at runtime. Only the selected item is visible when the user is not interacting with the list, and the other items become visible when the user clicks the control to see the items that can be selected. Only one item can be selected in this control. This control must be inserted into a server side form (runat="server") applied.2. System.Web.UI.WebControls.ListBoxthis control renders a list of items within a scrolling box, multiple items can be selected in this control if required. This control must be inserted into a server side form (runat="server") applied.3. System.Web.UI.HTMLControls.HTMLSelectthis control can be used to render a drop-down list or a scrolling list of items. This control has less built in functionality when compared with controls above (It lacks many of the properties that can be used to influence the display style such as ForeColor and BackColor to name a couple) ,but it is still capable of performing most common uses of a list control. This control can be inserted anywhere, and does not require a server side form.

 194 views

47⟩ What is versioning in .NET?

Different versions of a same component can run in one computer.we can achieve it by registering the assembly in the global assembly cache.

 190 views

48⟩ How does u call and execute a SP in .NET?

Public DataSet SampleToExecute_SP_IN_DOTNET() { DataSet DataSetHome = new DataSet(); SqlConnection SqlConnectionHome=new SqlConnection(strConnectionString); SqlCommand SqlCommandHome=new SqlCommand(); SqlCommandHome.Connection = SqlConnectionHomeReportCheck; SqlCommandHome.CommandText = "CLM_getCurYearStatistics"; SqlCommandHome.CommandType = CommandType.StoredProcedure; SqlDataAdapter DataAdapterHome = new SqlDataAdapter(SqlCommandHome); try { DataAdapterHome.Fill (DataSetHome); return DataSetHome; } catch(SqlException ex) { throw(ex); } catch(Exception ex) { throw(ex); } finally { DataAdapterHome.Dispose (); SqlCommandHome.Dispose(); SqlConnectionHome.Close(); } }

 228 views

49⟩ Explain Why Datareader is useful?

Data Reader is Read only version Data Set,Each record is returned as a Data Reader Object,ExecuteReader method acts directly on the database connection.

There are two versions of the data reader object:

OleDbDataReader and SqlDataReader.

Data reader is used to fetch the records from database in read only and forward.

 195 views

50⟩ What are ASP.NET Web Forms? How is this technology different than what is available though ASP (1.0-3.0)?

ASP .NET Web form is a tool used to design a web page using the drag and drop feature in VS .NET and is similar to the 'Form' tool in Visual Studio 5.0/6.0. It functions like the Form tag in classic ASP to get or post data from or to the server.

The difference between a classic ASP page and an ASP web Form is as follows:-

A classic ASP has the extension .asp.

An ASP.NET web form has the extension .aspx

-------------

A classic ASP page can be created using a Text editor or programs like DreamWeaver.

An ASP .NET web form is created in a project in the VS.NET environment.

------------

The source of a classic ASP is in VBScript or JavaScript and is visible to the end user.

The source of an ASP.NET web form is written in the code behind file ex: .cs for C# or .vb for VB.net and is invisible to the end user.

-------------

An ASP.NET Web form is Event driven.

 222 views

53⟩ Explain What is an assembly?

Assembly is a collection of code files , types and resources. It is a unit of deployment,version cotrol and reuse.Assembly is basically collection of exe or dll files which are generated upon successfull compilation of the .Net application

 220 views

54⟩ What is .NET remoting?

.NET remoting provides a framework that allows objects to interact with one another across application domains. The framework provides a number of services, including activation and lifetime support, as well as communication channels responsible for transporting messages to and from remote applications.for further info refer MSDN

 187 views

56⟩ Explain Diff. betn Dataset and Recordset?

DataSet can be considered as a logical database as it has the capability to store more than one table and have relations maintained between the tables as in a relational database. Where as a RecordSet can hold only one table at a time.

 175 views

59⟩ Can you edit data in the Repeater control?

A Repeater control is a light weight control which can be used for simple reporting purposes. It supports basic event-handling like Init, Load, Unload etc., This also supports some basic formatting of data and can be presented to the user. A Repeater control offers limited level of data editing or selecting capabilities. For such editing and updates ASP .Net offers DataList and DataGrid controls.

 200 views