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
Define static constructor?
What is bson in web api?
Define the steps to set up validation control.
What is the full meaning of asp.net?
What do you mean by authentication?
How can you apply a theme to your asp.net application?
What are the different method of navigation in asp.net?
How do I use a proxy server when invoking a web service?
In which event are the controls fully loaded?
Can we create a multiple user simultaneously ?
What are the new data controls in asp.net 2.0?
About CLR, reflection and assemblies?
How many ways are there to maintain a state in .net? What is view state?
Does asp.net still recognize the global.asa file?
What are the different session state management options available in asp.net?