• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 761
  • Last Modified:

LinkButton as navigator button

Hello,

I need a way to click on a LinkButton to navigate to a site such as www.google.com.

Thank you!
0
Rad1
Asked:
Rad1
1 Solution
 
Tom BeckCommented:
You can add an OnClientClick attribute to it: OnClientClick="Navigate()".

function Navigate(){
    window.location.href="http://www.google.com";
}

Or you can use a standard html button.
<input type="button" onclick="location.href="http://www.google.com" value="Google" />
If you need to access it from the code behind you can add a runat="server".
0
 
Rad1Author Commented:
Great and thank you!!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now