Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
good evening,
 
i have given link button as www.google.com.
 
if i click that link button, i must be redirected to google site.
 
i have tried response.redirect,but it is not working.
 
so please help me.
 
thank you.
Posted 11-Feb-13 3:01am
Comments
aspnet_regiis -i at 11-Feb-13 8:08am
   
Show your code
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

<button onclick="location.href='www.google.com'">Click me to go to Google.com</button>
 
Cheers,
Edo
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Response.Redirect("http://google.com");
  Permalink  
Comments
Avik Ghosh22 at 11-Feb-13 8:12am
   
try this...tested code...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

try these codes :-
protected void lnkButton_Click(object sender, EventArgs e)
{ 
   Page.ClientScript.RegisterStartupScript(this.GetType(),"OpenWindow","window.open('http://www.google.com','_newtab');",true);
}
 
Good luck.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

You can do this like :
 
<asp:LinkButton runat="server" ID="lnk1" PostBackUrl="http://www.google.com">www.google.com</asp:LinkButton>
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100