How to gather the caller page information?

A

ABC

How to gather the caller page information? I want to check the enter from
when entering the onload event of the page. Which properties or functions
have that information?
 
D

DavidG

Are you asking how to retrieve values when the client posts back the
page, if so:

1) Server controls are accessed using the object properties, so if my
page has a textbox control called txtCustomerName I can access it in
code with :

if (Page.IsPostBack)
{
string customerName = txtCustomerName.Text;

Label1.Text = customerName;
}

2) html controls you can use the Request object in code

if (Page.IsPostBack)
{
string customerName =
Request["txtCustomerName"].ToString();
Label1.Text = customerName;
}

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top