I am trying to redirect another site on button click.
Answers were Sorted based on User's Feedback
Answer / sunil kumar singh
Response.Redirect("http://yahoo.com");
Is This Answer Correct ? | 10 Yes | 1 No |
Answer / guest
You can also use PostbackUrl property associated with
button control in ASP.NET,
such as : <asp:button id = "b1" PostBackUrl = "www.sify.com"
runat = "server" Text = "redirect"/>
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / anju
Hi Anjani, there is a mistake in answer is that the link button control doesn't contain the NavigateUrl property but we do this task by doing this in the linkbutton control source view is:
<asp:LinkButton ID="lnkbtn" runat="server" OnClick="lnkbtn_Click" OnCommand="link"><a href="http://www.google.com">Link</a></asp:LinkButton>
</div>
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / anjani
you can use the link button control in that control there is a property c/d NavigateUrl in which u specify either the URL of any site or any page of the application...
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / usha
Response.Redirect("link name");
http://www.interview-questions.maxmice.com
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / gopakumar
There is a mistake in answer is that the link button
control doesn't contain the NavigateUrl property but we do
this task by doing this in the linkbutton control source
view is:
<asp:LinkButton ID="lnkbtn" runat="server"
OnClick="lnkbtn_Click"><a
href="http://www.google.com">Link</a></asp:LinkButton>
</div>
The OnCommand="link" is not needed.
<asp:LinkButton ID="lnkbtn" OnClick="lnkbtn_Click"
runat="server" >
<a href="http://www.google.com">Link</a>
</asp:LinkButton>
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
how to add cliet side event to server side? and how to register client script to sever side? wt difference these two
What is the life cycle of web page?
what is the challenging situation you faced in your career?
3 Answers Calsoft, HP, Satyam, Wipro,
Explain how inline and code behind is used differently ?
What is windows active directory authentication?
1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5
Difference between asp and asp.net ?
4 Answers Accenture, BirlaSoft, TCS,
What is difference between Server.Transfer and Response.Redirect in ASP.NET?
0 Answers Sans Pareil IT Services,
Difference between HTML control and Web Server Control?
What's the difference between Page.RegisterClientScriptBlock and Page.RegisterStartupScript ?
Why is catch(Exception) almost always a bad idea?
Can a master page inherit another master page?
13 Answers Emphasis, IBM, NIIT, Sebiz Square,