hyperlink/button

  • Thread starter Thread starter Ingeborg
  • Start date Start date
I

Ingeborg

Hi.

I want to insert an hyperlink/button for loading another
page, but I need to store some data in this operation too,
but I don't think the HyperLink web control has
a "onclick" event, and I have not yet found a way to load
a Page in C#.

Please help me...

Thanks in advance,
Ingeborg
 
Yopu can use a hyperlink and pass info to the new page via the query string.
And then in the new page do a request.params to get the info from the
querystring. You only want to pass the info via the querystring if it is not
sensitive info. If it is a credit card info or thelike you'll need to do
another way.
 
Ingeborg said:
Hi.

I want to insert an hyperlink/button for loading another
page, but I need to store some data in this operation too,
but I don't think the HyperLink web control has
a "onclick" event, and I have not yet found a way to load
a Page in C#.

Use a LinkButton instead. Linkbuttons have an OnClick event,
but they look like a hyperlink.

At the end of the event handler, use either:
Response.Redirect("newfile.aspx")
or
Server.Transfer("newfile.aspx")
 
Back
Top