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 are client activated objects and server activated objects?
What is the difference between login controls and forms authentication?
Why do we need asp.net?
What does the orientation property do in a menu control?
What is the difference between Session and response.Redirect?
Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc
What is a page life cycle?
What is the life-span of the items in the viewstate?
What are the asp.net security controls?
Define msil.
How can I create master page in asp net?
i want to implement grid view value in paypal site. so how to create this code in asp.net with C#
What is synchronous and Asynchronous post back ?
Explain why it is useful to use mvc instead of webforms? : asp.net mvc
I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?