Solved

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

Posted on 2011-02-27
2
481 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

717 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