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
Where are session variables stored?
How can you display all validation messages in one control?
What is http post and http get?
What is css in asp.net?
What is content place holder?
How does the iis work?
What is special types forms
How to display validation messages in one control?
Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
What do you mean by marshalbyref?
Explain how to prepare culture-specific formatting in .net.
How do u declare static variable and how it is declared and what is its lifetime?
They mostly asked difference between versions of technologies
What is the use of session?
What is the difference between page-level caching and fragment caching?