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
What is preprocessor in .net? Where it use?
What is asp.net localization?
If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?
When does a session actually start?
How do you implement sql caching in asp.net?
Differentiate between authentication and authorization.
What is ispostback method in asp.net?
What are the differences between clr & cts?
Explain about asp.net caching?
What is server side routing?
How ViewstateMac works?
Explain the difference between web user control and web custom control?
What’s the difference between response .redirect and server.transfer?
Will the asp.net validators run in server side or client side?
Is asp.net and .net are same or different?