Hi Shanky11,
You can use many ways to pass the data from one page another page.
1)Session data is a user specific data stored into the server memory.
This is the first page code: Session[["CustomerID"]=lblCustomerId.Text;
Second page code:
long longCustomerId= Convert.ToInt64(Session["CustomerID"]);
2)QueryString is suffixed with the url of the page separated by "?" (question mark) in the form of key and value. In below code snippet, we have "CustomerId" and "com" querystring with "8" and "show" value respectively.
Example: Response.Redirect(CustomerDetails.aspx?CustomerId=8&com=show);
in Second page :if (!string.IsNullOrWhiteSpace(Request.QueryString["CustomerID"]))
{
long CustomerId= 0;
long.TryParse((Request.QueryString["CustomerId"], out CustomerId));
//here you cane use Previous page CustomerId
}
Shanky11, if this helps please login to Mark As Answer. | Alert Moderator