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 do you understand from custom control?
What is http post action?
When we use cookie less session? Explain its working?
How can you handle errors in Web API?
How can we identify that the Page is Post Back?
Why should i prefer JSP over asp.net or any other web development language..??
Explain what are the advantages of asp.net mvc framework? : asp.net mvc
What is asp.net and how it works?
What is the use of ASP.NET routing?
How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?
What describes a query?
Can the validation occurs in server-side or client-side? If the validation occurs why should we do?
What methods are fired during the page load? Init()
Explain about consistent programming model in the .NET framework?
Explain the main function of url routing system in asp.net mvc? : asp.net mvc