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
Solved

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

Posted on 2011-02-27
2
469 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
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
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, …
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…

789 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