How to pass the values from aspx page to asp page in a same project.
If you have asp and asp.net pages in your project and you want to send the values from asp.net page to asp page then there are two ways;
1) Using Database
2) Using Cookies
A cookie is stored on the client's machine by their web browser software. To set a cookie, we include information in an HttpResponse that instructs the browser to save a cookie on the client's system. Here's the basic code for writing a Cookie in ASP.NET.
Response.Cookies["tutorials”].Value = "DotNetLogix”;
And to read the cookie back:
Note that for security reasons you can only read a cookie that was set within the same domain name.
Sometimes you may need a collection of stored items, such as user address details. In this case you could read in a cookie collection like this:
HttpCookieCollection cookies = Request.Cookies;
HttpCookie cookie = cookies[n];
Name: " + cookie.Name + "
Response.Write("Expiry: " + cookie.Expires + "
Response.Write("Address1: " + cookie.Address1+ "
Response.Write("Address2: " + cookie.Address2+ "
Response.Write("City: " + cookie.City+ "
Response.Write("Zip: " + cookie.Zip+ "
Finally, you can see details of cookies during development, by turning on tracing in ASP.NET. Within the @Page directive at the start of the page simply adds Trace="true”:
<%@ Page trace="true" language="c#" Codebehind="page.aspx.cs" Inherits="MyPage" %>