I am trying to redirect another site on button click.
Answer Posted / richard des jardins
Assign the OnClick property of the Button the the Method
that will handle the OnClick Event" OnClick
= "MyButton_Click" for C#. Alternatively for VB.NET ue the
Handles Keyword on the Method lie this :
Protected Sub MyButton_Click(ByVal Sender As Onbject, ByVal
e S EventArgs) Handles MyButton.Click
C#;
Protected Void MyButton_Click(Object sender, EventArgs e).
Inside the method handle the event:
Response.Redirect("")
Response.Transfer("",false)
This way, you can perform any other tasks you may want to
do such as writing to an event log, or updated a database
record before redirecting the user.
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain parts of assembly?
Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
What is a uri query?
what is silver light when will we use silver light,
Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?
What is a 404 redirect?
What is the function used for removing an event listener?
Explain the concept of MVC Scaffolding?
Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?
what is a .xap file? Explain with an example.
Which method has beenintroduced in asp.net 4.0 to redirect a page permanently?
Explain about solution explorer window?
Can you explain the importance of finalize method in .net?
What are the new web part controls in asp.net 2.0 ?
Where is session cookies stored?