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

61⟩ Explain What is an abstract class?

An abstract class is one in which methods are defined but an object of this class cannot be instanstiated.this type of a class can only be derived but cannot be instantiated.

 128 views

62⟩ Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component?

If you are developing an intranet app and you want to display the current stock price of your company, its best to consume a webservice the provide that service. IOW, when you want to get 'outside' data throuh a corporate firewall

If, say, you want to display latest news from HR deartment in your portal, better to have a .NET DLL that connect to corporate HR Database and get the info.

 152 views

68⟩ Which namespace is used to get assembly details?

System.Assembly is the namespace which u need to include in u r program to get the assemply details.To get the assemply details of the current running one is thru reflection so u need another namespace calledSystem.Reflection "Happy Programming"

 133 views

69⟩ What is CLR? Diff between CLR & CTS?

CLR is the Common Language Runtime for the dotnet frame work.

CTS is the Common Type Sytem for all languages.It consists of the types(Class,Enums,Structs,Interfaces etc for any language)

CTS is one of the component of CLR.

CLR is the Runtime Engine which provide services to execute the application.CTS is part of CLR

 135 views

70⟩ What is DLL hell?

Previously, before .NET, this used to be a major issue. "DLL Hell" refers to the set of problems caused when multiple applications attempt to share a common component like a dynamic link library (DLL) or a Component Object Model (COM) class. In the most typical case, one application will install a new version of the shared component that is not backward compatible with the version already on the machine. Although the application that has just been installed works well, existing applications that depended on a previous version of the shared component might no longer work. In some cases, the cause of the problem is even more subtle. In many cases there is a significant delay before a user discovers that an application has stopped working. As a result, it is often difficult to remember when a change was made to the machine that could have affected the application. A user may remember installing something a week ago, but there is no obvious correlation between that installation and the behavior they are now seeing. The reason for these issues is that version information about the different components of an application aren't recorded or enforced by the system. Also, changes made to the system on behalf of one application will typically affect all applications on the machine.

 128 views

71⟩ What is diff. between abstract class and an interface? What is shadowing? Diff between Overriding and overloading?

An abstract class and Interface both have method only but not have body of method.The difference between Abstract class and An Interface is that if u call Ablstract class then u have to call all method of that particular Abstract class but if u call an Interface then it is not necessary that u call all method of that particular interface.Method OverLoading:-Return type, Parameter type, parameter and body of method number may be different.Method Overriding:- Return type, Parameter type, Parameter Number all must be same . Only body of method can change.

 145 views

72⟩ How to create a DB connection at one place/page so that we can use that connection for all pages/forms/windows.what r the steps ned to be performed. if question not clear,let me know.

<?xml version="1.0" encoding="utf-8" ?>

<!-- Web.Config Configuration File -->

<configuration>

<appSettings>

<add key="ConnectionString"

value="server=localhost;database=Northwind;uid=sa;password=secret;" />

</appSettings>

<system.web>

<customErrors mode="Off"/>

</system.web>

</configuration>

Imports System

Imports System.Web

Imports System.Web.UI

Imports System.Web.UI.WebControls

Imports System.Data

Imports System.Data.SqlClient

Imports System.Configuration

Public Class ConnString : Inherits Page

Protected dataGrid As DataGrid

Protected Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)

Dim sqlConn As SqlConnection

Dim sqlCmd As SqlCommand

Dim strConnection As String

Try

'Get connection string from Web.Config

strConnection = ConfigurationSettings.AppSettings("ConnectionString")

sqlConn = New SqlConnection(strConnection)

sqlCmd = New SqlCommand("SELECT * FROM Customers WHERE " _

& "(CompanyName LIKE 'A%') OR (CompanyName LIKE 'B%')", sqlConn)

sqlConn.Open()

dataGrid.DataSource = sqlCmd.ExecuteReader()

dataGrid.DataBind()

Catch ex As Exception

Response.Write(ex.ToString & "<br>")

Finally

sqlConn.Close()

End Try

End Sub

End Class

 163 views

73⟩ What is IPostBack? How to use it?

Gets a value indicating whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.

Property Value

true if the page is being loaded in response to a client postback; otherwise, false.

void Page_Load() {

if (!IsPostBack) {

// Validate initially to force asterisks

// to appear before the first roundtrip.

Validate();

}

}

 138 views

74⟩ What is server infrastructure & Server components?

Component product of Windows Server System is effective on its own, as individual components and as part of an integrated system. To provide a framework for Windows Server System product improvement, Starting with the infrastructure server product releases for 2005, with a vision of delivering a common set of services across all Windows Server System products.

All Windows Server System products will provide infrastructure built on the Volume Shadow Copy Service to support fast backup and recovery of data. Each Windows Server System product team will develop a Volume Shadow Copy Service writer. Volume Shadow Copy Service is a framework for facilitating communication among applications, storage subsystems, and storage management applications (including backup applications) to define, persist, and exploit point-in-time copies of storage data.

This infrastructure will provide backup/restore to product solution providers to reduce their cost of product development

and enable IT administrators to provide their organizations with fast backup and recovery of data at reduced costs.

 131 views

75⟩ Explain What is event bubbling?

Event Bubbling is nothing but events raised by child controls is handled by the parent control. Example: Suppose consider datagrid as parent control in which there are several child controls.There can be a column of link buttons right.Each link button has click event.Instead of writing event routine for each link button write one routine for parent which will handlde the click events of the child link button events.Parent can know which child actaully triggered the event.That thru arguments passed to event routine. " Happy programming"

 141 views

76⟩ Which dll handles the request of .aspx page?

When the Internet Information Service process (inetinfo.exe) receives an HTTP request, it uses the filename extension of the requested resource to determine which Internet Server Application Programming Interface (ISAPI) program to run to process the request. When the request is for an ASP.NET page (.aspx file), IIS passes the request to the ISAPI DLL capable of handling the request for ASP.NET pages, which is aspnet_isapi.dll.

 123 views

80⟩ Please brief not about XSD,XSLT & XML?

XSD stands for XML Schema Definition.It define the structure of the XML file and the elements and attributes it contains.The datatype of the elements.So that when u populate XML data into dataset, the dataset can treat elements differently based on their type.If XSD is not present dataset treats all elements as string type. XSLT stands for XML style sheet lang tranformation.It is lang used for transforming XML data in one format to another format.Example XML data into HTML format. XSLT uses XPath to identify the elements in XML doc and transform those to desired format

 126 views