Solved

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

Posted on 2011-02-27
2
443 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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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.
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now