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 r the asp.net list controls and difference between them?
How can you implement the postback property of an asp.net control?
How will you load dynamic assembly? How will create assesblies at run time?
Describe session handling in a webfarm?
Define static member?
What parameters can you pass in the url of the api? Can get and post use the same url?
witch is the best insistute in sharpoint course.what abt future of share point course.
How can we access static variable?
What is the difference between cache and cookies?
Which method do you use to kill explicitly a users session?
How does output caching work in ASP.NET?
How will you load dynamic assembly?
What are validator? Name the validation controls in asp.net?
How do you create a master page?
Explain in what order a destructors is called.