Solved

asp.net - javascript- on client side pull aonther .aspx page on click

Posted on 2011-02-27
2
473 Views
Last Modified: 2012-05-11
how do I code a js function so that on button click it will direct to another page

               <td>
                    <a href="javascript:GoTo('Page2','')">
                    <img alt="Step 2 - Inside Front Cover" border="0"
                        src="https://ggg/MRCTest/img/Partvailer/ProgvssBar/Offv.gif" /></a></td>
0
Comment
Question by:GlobaLevel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 500 total points
ID: 34992346
Javascript function
<script type="text/javascript" language="javascript">
        function redirect()
        {
        window.location = "http://www.google.com";
        }
    </script>

Open in new window


ASPX Button
<asp:Button ID="Button1" runat="server" 
            Text="Button" OnClientClick="javascript:redirect();" />

Open in new window


Hope this helps!
Raj
0
 
LVL 16

Expert Comment

by:BurnieP
ID: 34992402
You can just put the location of your next page using your a href?

<td><a href="Page2.html"><img alt="Step 2 - Inside Front Cover" border="0"  src="https://ggg/MRCTest/img/Partvailer/ProgvssBar/Offv.gif" /></a></td>
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question