hyperlink/button

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
 
S

Showjumper

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.
 
J

Jos Branders

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")
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top