Results 1 to 3 of 3

Thread: ASP:Button and ASP:ImageButton

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    ASP:Button and ASP:ImageButton

    Simple question:
    How do I make a JS-function with OnClick for these two types of buttons which directs me to the page "test.aspx" placed at the same path?

    <asp:Button ID=si Text=SI Runat=server onClick="newUrl()"></asp:Button>

    function newUrl()
    {
    ...
    }

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: ASP:Button and ASP:ImageButton

    Code:
    function newUrl()
    {
    document.location.href='test.aspx';
    }

  3. #3
    Addicted Member
    Join Date
    Aug 2004
    Location
    Cape Town, South Africa
    Posts
    149

    Re: ASP:Button and ASP:ImageButton

    function newUrl()
    {
    location.href = (URL)
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width