Sunday, August 30, 2009

Gird view Find result

When you are using paging then you use lines of code for finding the rowindex id

GridViewRow gvr = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
int RowIndex = gvr.RowIndex;

When you are doesn't use paging then you ues below code to find the row index record

int index = Convert.ToInt32(e.CommandArgument);

// Retrieve the row that contains the button clicked
// by the user from the Rows collection. Use the
// CommandSource property to access the GridView control.
GridView customersGridView = (GridView)e.CommandSource;
GridViewRow row = customersGridView.Rows[index];

// Create a new ListItem object for the customer in the row.

Monday, August 17, 2009

Data Bind

Binding database record in the your strcture.

<%#Eval("id") %>
<%#Bind("id") %>

Sunday, August 16, 2009

Java Script Cookies

function Declaration of Read Cookies :--
function ReadCookie(cookieName) {
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 cookieName=="") return "";
var ind1=theCookie.indexOf(';',ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
function calling of Read cookies :-