Saturday, August 2, 2008

1.How to update the data in dataset

A.The dataset can be considered as an in-memory cache of the data retrieved from the database.So the dataset consites of the tables, relationship and constraints.

To insert, update or delete the data in the database we use the sqlcommand

2.Why we need both server controls and html controls in asp.net. what is the difference between them?

A.HTML Server Controls:

This controls will follow similar syntax of html client side controls with the same set of properties (with runat="server" attribute). The purpose of this HTML Server controls is towards migration projects. And this HTML Server Controls doesn't support extensibility.

Web Server Controls:

These are very advanced controls if compared to HTML Controls. These controls overcome the extensibility problem which araises in HTML Server Controls. These controls are also called as Smart Controls, because these controls will produce HTML context based on reuested browser.

These Controls also supports data binding and xml based syntax with .net object model.

3.Whats the diffrence between Custom Control and a User Control?

A.If none of the existing ASP.NET server controls meet the specific requirements of your applications, you can create either a Web user control or a Web custom control that encapsulates the functionality you need. The main difference between the two controls lies in ease of creation vs. ease of use at design time.

Web user controls are easy to make, but they can be less convenient to use in advanced scenarios. You develop Web user controls almost exactly the same way that you develop Web Forms pages. Like Web Forms, user controls can be created in the visual designer, they can be written with code separated from the HTML, and they can handle execution events. However, because Web user controls are compiled dynamically at run time they cannot be added to the Toolbox, and they are represented by a simple placeholder glyph when added to a page. This makes Web user controls harder to use if you are accustomed to full Visual Studio .NET design-time support, including the Properties window and Design view previews. Also, the only way to share the user control between applications is to put a separate copy in each application, which takes more maintenance if you make changes to the control.

Web custom controls are compiled code, which makes them easier to use but more difficult to create; Web custom controls must be authored in code. Once you have created the control, however, you can add it to the Toolbox and display it in a visual designer with full Properties window support and all the other design-time features of ASP.NET server controls. In addition, you can install a single copy of the Web custom control in the global assembly cache and share it between applications, which makes maintenance easier

Wednesday, July 30, 2008

4.How to show graphs in ASP .net ?graphs will be based on the databse?

A.We can use

System.Drawing;

System.Drawing.Drawing2D;
name spaces for drawing graphs based on data from databases in web pages

5.Explain the life cycle of an ASP .NET page?

A.Events in ASP.Net 1.1 & 2.0 :-



Application: BeginRequest
Application: PreAuthenticateRequest
Application: AuthenticateRequest
Application: PostAuthenticateRequest
Application: PreAuthorizeRequest
Application: AuthorizeRequest
Application: PostAuthorizeRequest
Application: PreResolveRequestCache
Application: ResolveRequestCache
Application: PostResolveRequestCache
Application: PreMapRequestHandler
Page: Construct
Application: PostMapRequestHandler
Application: PreAcquireRequestState
Application: AcquireRequestState
Application: PostAcquireRequestState
Application: PreRequestHandlerExecute
Page: AddParsedSubObject
Page: CreateControlCollection
Page: AddedControl
Page: AddParsedSubObject
Page: AddedControl
Page: ResolveAdapter
Page: DeterminePostBackMode
Page: PreInit
Control: ResolveAdapter
Control: Init
Control: TrackViewState
Page: Init
Page: TrackViewState
Page: InitComplete
Page: LoadPageStateFromPersistenceMedium
Control: LoadViewState
Page: EnsureChildControls
Page: CreateChildControls
Page: PreLoad
Page: Load
Control: DataBind
Control: Load
Page: EnsureChildControls
Page: LoadComplete
Page: EnsureChildControls
Page: PreRender
Control: EnsureChildControls
Control: PreRender
Page: PreRenderComplete
Page: SaveViewState
Control: SaveViewState
Page: SaveViewState
Control: SaveViewState
Page: SavePageStateToPersistenceMedium
Page: SaveStateComplete
Page: CreateHtmlTextWriter
Page: RenderControl
Page: Render
Page: RenderChildren
Control: RenderControl
Page: VerifyRenderingInServerForm
Page: CreateHtmlTextWriter
Control: Unload
Control: Dispose
Page: Unload
Page: Dispose
Application: PostRequestHandlerExecute
Application: PreReleaseRequestState
Application: ReleaseRequestState
Application: PostReleaseRequestState
Application: PreUpdateRequestCache
Application: UpdateRequestCache
Application: PostUpdateRequestCache
Application: EndRequest
Application: PreSendRequestHeaders
Application: PreSendRequestContent

Tuesday, July 29, 2008

6.What is .net frame work?

A.Net framework is an environment provided on top of the OS which looks into

Memory management
Thread management
and provides

Language independence
Platform independence
It is defined by Microsoft as 'an environment for building, deploying and running web services and other applications. It consists of three main parts -- CLR, framework classes and ASP.Net'

.Net facilitates integration of code written for desktop applications with code written for web applications. It also facilitates creation of assemblies from code files written in different .net languages. It provides a common type system (CTS) for bringing data types of all languages on a common platform.

7.What is the maximum number of cookies that can be allowed to a web site?

A.20
Maximum number of cookies allowed is 300.

8.Explain Assemblies?,Difference between Panel and GroupBox?,Differences between ASP and ASP.NET?

A.ASSEMBLIES

Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.
I found that there are numerous posts for Assemblies but none for giving out the difference between Panel and a Group Box. Although a Panel as well as the groupbox are almost the same there are minute differences.

In group box you can enter text while you cant do that in Panel.

In Panel you have got a built in support for scrollbars which is not available in case of group box.

Hope this information is useful....Happy Programming !!!

There is lots of difference between ASP and ASP.NET

Asp Vs ASP.Net some are :

ASP is Procedure oreinted Language where as ASP.Net Supports OOPS.

UI and Code behind is very well defined and Isolated.

UI can supports multiples of Code Behind languages (VB, C# etc.,)

Late binding is present in the ASP.Net

9.Difference beetween datagrid and datareader?

A.A datagrid is a simple server control to which data from a datsourcecan be binded.whereas a datareader is a a forward only stream of data from the data source that holds reference to one record at any given time

10.What is the difference between excute query and excute nonquery.?

A.Execute Query is the method which is used to return the result of the command like select Query. That is Update Query. The Execute Non Query

is used to return the Query os the statement like the update Delete Insert which returns No data

11.Can we use http handlers to upload a file in asp.net?

A.Answer is yes. We can use http handlers to upload a file in asp.net.

To perform file upload in ASP.NET, you need to know two classes: the System.Web.UI.HtmlControls.HtmlInputFile class and the System.Web.HttpPostedFile. The first class represents an HTML control that the user uses to select a file on the client side and upload it. The latter represents the uploaded file itself, and an instance of this class is obtained from the HtmlInputFile control. The next two subsections discuss each class in detail.

<% @ Import Namespace="System.IO" %>

12.What is the default size cache?

A.The default size of cache is doubles of your system RAM size.

i.e.if ur ram is of 128mb then the default cache size is 256mb

13.What is name space for xml in asp.net

A.system.xml

14.is there any limit for query string? if means what is the maximum size?

A.255 bytes (Request others to specify units for clarity)

15.server control executes on server but html on client side.server control is dynamic by nature but html are static?

A.webapplication is a collection of webresources,
webresources cab be static resource like xml,html... and dyanamic resources like asp,jsp..
website is a collection of webpages
webserver is a server where we run our webapplication i.e iis

16.Describe the difference between a server control like a listbox & its HTML equilivant?

A.server control executes on server but html on client side.server control is dynamic by nature but html are static.

Sunday, July 27, 2008

17.what is .net?

A.net is language independent platform.or framework.provide assemblies ,tools to build dynamic application.

18.How can i configure DataAdapter to generate dataSet?

A.MyConnection = New SqlConnection(strConn)
MyAda = New SqlDataAdapter(sqlStr, MyConnection)
DS = New DataSet()
MyAda.Fill(DS, "pubs")

19.Life cycle of ASP?

A.Life Cycle of Asp.Net

Init
PageLoad
Pre Render
Page UnLoad

20.How to create virtual directory & how to access it?

A.CLICK START BUTTON IN THE TOOLBAR
GO TO RUN COMMAND
ENTER "INETMGR"
IIS WINDOW WILL BE OPENED
THEN CLICK ON IIS(INTERNETINFORMATIONSERVICE)

"XYZ(LOCALCOMPUTER)"NAME WILL BE DISPLAYED

DOUBLECLICK ON THAT U WILL GET "WEDSITE"FOLDER

DOUBLECLICK ON THAT U WILL GET "DEFAULT WEBSITE" OPTION

SELECT THAT OPTION & RIGHT CLICKON THAT "DEFAULT WEBSITE" GO TO "NEW"

THEN U CAN FIND THE "VIRTUAL DIRECTORY"