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.