multiple ASP.NET web forms...

  • Thread starter Thread starter somersbar
  • Start date Start date
S

somersbar

hi,

i have a checkbox in a web form, and if its been checked, i need to
make a label in the following form visible. ive only just started web
forms so i dont really know the best way to go about passing data
between forms in general.

can anyone help please?
 
Hi Somers,

You have multiple ways of passing between forms.

You can use querystring for this purpose. Since the data does not need
to be secured and it just needs flag check in the other form.

Use below line to transfer if the form is checked.
Response.Redirect("\NewForm.aspx?Checkbox=1")

On the page load event in the new form
String chkFlag = Request.QueryString("Checkbox)
If (chkFlag <> nothing)
if(chkFlag==1)
label1.visible= true
else
label1.visible = false

Hope this would help you.

Cheers,
Kris
 

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

Back
Top