Subscribe

RSS Feed (xml)

How Many types of Page Load functions in asp.net?

Page_AbortTransaction
Page_CommitTransaction
Page_DataBinding
Page_Disposed
Page_Error
Page_Init
Page_InitComplete
Page_Load
Page_LoadComplete
Page_PreInit
Page_PreLoad
Page_PreRender
Page_PreRenderComplete
Page_SaveStateComplete
Page_Unload



this is the main page load functions

Page_init
Page_Load
Page_Prerender
Page_Unload

How to retrieve data row by row from a DataTable?

foreach(Datarow dr in table.rows)
{
string str = dr[0].ToString();
string str1 = dr["columnName"].ToString();

}



In C#

foreach(DataRow dr in dt.rows) //dt is Data table
{

string ABC= dr["Coloumn_Name"].Tostring;

}

is it possible to use web site without web server from remote place?

Yes, It is Possible. As Website is Deployed In Web server
in IIS. There is no need to have Web server in Remote Place.

is it possible to set more than web.config file for an ASP.net APPLICATION?can it run?how is it possible?

Yes we can have as many as Web.Config Files we want. When
we have multiple Web.config files the CLR will Search for
the Config file which is just below the calling code.

We can create two or more web.config
file in a ASP.NET application. For Example, we have to
sessions to execute 1. End-User point of view and 2.
Admin/User Point of View. In our web application we can
create a folder named Admin - inside that folder we can
create a web.config and in root folder too we can create a
web.config. Admin folder's web pages will execute based on
admin folder web.config and in the same way to root folder.

IS IT POSSIBLE TO SET TIME FOR COOKIES?HOW IT IS POSSIBLE?

Yes,
Request.Cookies["UserCoook"].Expires = DateTime.Now;

Likewise we can able to set time fro cookies

How to use Treeview IE Web Control

The first step is to install the IE Web Controls from Microsoft.The link to download and
install these controls is as follows: http://msdn.microsoft.com/downloads/samples/
internet/default.asp?url=/downloads/samples/internet/asp_dot_net_servercontrols/webcontrols/default.asp


The next step is to add a reference to the controls on your page:
<%@ Register TagPrefix=”mytree” Namespace=”Microsoft.Web.UI.WebControls”
Assembly=”Microsoft.Web.UI.WebControls” %>;
<%@ import namespace=”Microsoft.Web.UI.WebControls” %>;
Then you add the TreeView control to your page:


The last step is to add the node information to the TreeView.This is the list of items that
will appear when you expand the tree:
<mytree:treeview runat=”server” id=”myTree”>
<mytree:treenode text=”Cars”>
<mytree:treenode text=”Ford” />
<mytree:treenode text=”Toyota” />
<mytree:treenode text=”Infiniti” />
</mytree:treenode>
</mytree:treeview>

Here, we created one node called Cars and then added nodes within that node for different
car manufacturers.

The TreeView IE Web Control is a very powerful and easy-to-use control. In this example,
you saw how easy it was to create an explorer-like expandable tree.When adding
nodes to the TreeView, you use a very XML-like approach whereby the nodes that are
under a parent node are contained inside the parent node tag. If you encounter errors
when trying to add a reference to your page, or you receive errors indicating that the
Web Controls cannot be found, copy the Web Controls DLL to the bin directory of
your application.

What is WebService ?

a software system designed to support interoperable
machine-to-machine interaction over a network


Web Service--->is nothing but " Programmable and reusable business logic
with set of classes presented on the web server"

How to deploy the Asp.Net Project ?

2 ways
create a MSI package
or place the precompiled webpages in a shared folder on the
hosting server.

What is Partial in ASP.NET 2.0?

We can split one part of a class in one file and the other
part in some other file using the partial keyword. The
compiler merges these partial classes spread across one or
more source files into a single compiled class at the time
of compilation .

What is the difference between a session object and cache object?

Caching :- used to minimize the DB/Server hit and improves
Performance.data is available to all users.Can expire
automatically once duration is specified and untill memory
is available or expires as application restarts.

Session :- used to store data specific to user and remains
untill user loggs off or session expires. usually session
lasts for 20 minutes(configurable)

what is view state?

View State is maintains users state at Client Side.It
provides property to store retention value between multiple
web request.It stores value in HTML hidden field in web page.

View State is a mechanism by which we can maintain the
state during the subsequent post back of same .aspx
page...means suppose we have a registration form to fill i
fill all the entries but some entries were wrong then what
happen next i'll get only those value which was wrong means
i won't fill all the value again just fill the wrong value
only...

What is boxing and unboxing ?

BOXING
? Boxing is an implicit conversion of a value type to
the type object

UNBOXING
? Unboxing is an explicit conversion from the type
object to a value type

What is sequence of code in retrieving data from database?

SQLConnection conn = new
SQLConnection("DataSource=;InitialCatalog=;User Id=;Password=");
SQLCommand cmd=new SQLCommand("select * from tablename",conn);
DataAdapter da=new DataAdapter(cmd);
Dataset ds=new Dataset();
da.fill(ds,"tablename");

what is manifest?

Assemblies data is stored in manifest
In manifest include
assemblies information
like version of assemblies
security information etc
manifest is stored in PE file that is portable Executable
file in MSIL(Microsoft intermediate Language)
Manifest make assembly self describing.CLR use manifest
for execution.

How do you do validations. Whether client-side or server-side validations are better?

By default all the asp.net
controls are server controls that runs server side, so
validation controls do. To reduce the burden on the server
we will use java script validation which will be done client
side.

What is Http handler?

It as a program.(or handler, or module), it execute some
code when the user send some request. An .aspx page can be
thought as a HTTP Handler too, which implements more
functions.

Webconfig file is cofiguration of server or browser?

it is a server configuration file for a particular
application.

Webconfig file is cofiguration of server or browser?

it is a server configuration file for a particular
application.

What are the major differences between asp.net1.1 and asp.net 2.0?

Asp.net 2.0 enhanced with many new features.

* Partial Classes
* Master pages
* Skins and Themes
* Roles and Member Profiles
* Generics
* Added many new server controls like
Grid View,Details View, File Upload etc..,
* Web Personalization - Web Parts
* New Folders lime App_Browsers,App_Code,etc..,

In ASP.NET user have to install the IIS. But In case of
ASP.NET 2.0 IIS is coming with the installation process.
another facility is the master page which is in ASP.NET 2.o
But not in ASP.net 1.1.

what are webservices?In which circumstances we can go for webservices?

Web service is a reusable component which resides in the
web server.
It is language independant and platform independant. This
means that any application written in any language can use
the service of a web service.
It uses the SOAP protocal and communicates using XML.

what is diffrance between response.write & response.output.write

Respons.Write will display the value/expresion as it is.
Response.Output.Write will display the formatted content.

what is the difference b/w Asp.net server controls and html server controls in .net?

ASP.Net Server Controls:

1. ASP .NET Server Controls can detect the target
browser’s capabilities and render themselves accordingly.
No issues for compatibility issues of Browsers i.e page
that might be used by both HTML 3.2 and HTML 4.0 browsers
code is written in the Server Controls.

2. Newer set of controls that can be used in the same
manner as any HTML control like Calender controls. Without
any need of Activex Control without bringing up issues of
Browser compatibility).

3. Processing would be done at the server side. In built
functionality to check for few values(with Validation
controls) so no need to choose between scripting language
which would be incompatible with few browsers.


HTML Server Controls:

1. The HTML Server Controls follow the HTML-centric object
model. Model similar to HTML

2. Here the controls can be made to interact with Client
side scripting. Processing would be done at client as well
as server depending on your code.

3. A HTML Server Control has similar abstraction with its
corresponding HTML tag and offers no abstraction.

Features in ASP.NET?

It has Comman Language Runtime execution Engin which
translate the source code into Microsoft Intermediate
Language (MSIL) .It is called Managed code.

One of the main features of asp.net is:
The code has not been Compiled instead of that Interpreting.
By doing that, the performance of a website will be
improved. Apart from that in asp.net we're using a
programming code called templates. For example if a
particular page of a website has been updated by inserting
some codes the modification part will not be shown to the
user when he is viewing the source code. apart from that
presentation content and application content have been
separated in Asp.net framework. So that the webdesigner can
create the application and the programmer can develop the
code for an application. And also in Asp.net application if
any changes need to be done in a website it can be done
inside the configuration setting of an application, instead
of that we need not want to restart the webserver, whatever
changes done in the configuration leavl will be altered.

what is the assembly?

Assembly is a small unit for development
Assemblies are provides Reusability,Versioning,and Security.
Assemblies will maintain collection of userdefined types
and resources information.

Types of assemblies are:
1.public
2.private
3.shared.
4.satellite
there will exceutable(.exe) assembly and Library code(.dll).
Assembly contain version infornmation,metadata,actual code.

what is CLR?

The .net frame work provides a runtime enviornment called
the common language runtime(CLR)

CLR handels the execution of code and provides useful
services for the implementation of the program in addition
to execution code.

CLR provides services like
===>Memory management
===>Thread Management
====>Security Management
======>Code Verification