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
In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely
How do u deploy ur project?
Where viewstate value is stored in asp.net?
How do we assign page-specific attributes?
How can you make sure that web api returns json data only?
What’s the difference between response .redirect and server.transfer?
Disable Mouse right click on web page in asp.net?
6. Tell us about a time when you failed to meet a deadline. What were the repercussions?
What is boxing and unboxing in asp.net?
What is the difference between server-side scripting and client-side scripting?
What are cookies in your browser?
What are query strings used for?
What is difference between asp state management and asp.net state management?
What does asp stand for in asp.net?
What is the mvc framework?