Keep LinkButton from postback

Discussion in 'ASP .Net' started by DavidC, Feb 3, 2010.

  1. DavidC

    DavidC Guest

    I have a LinkButton that I only want it to run a javascript function at the
    client so I put OnClientClick="return showdiv();" on it and the function
    returns false but the form still does a postback. How can I stop this?
    Thanks.
    --
    David
    DavidC, Feb 3, 2010
    #1
    1. Advertising

  2. DavidC

    DavidC Guest

    Ignore this. There was an error in the javascript function.
    --
    David


    "DavidC" wrote:

    > I have a LinkButton that I only want it to run a javascript function at the
    > client so I put OnClientClick="return showdiv();" on it and the function
    > returns false but the form still does a postback. How can I stop this?
    > Thanks.
    > --
    > David
    DavidC, Feb 3, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Al Cohen

    Disable Linkbutton Before Postback?

    Al Cohen, Dec 19, 2003, in forum: ASP .Net
    Replies:
    6
    Views:
    10,890
    Vikesh Arora
    Dec 28, 2004
  2. =?Utf-8?B?QmVuamFtaW4gSm9sZGVyc21h?=

    LinkButton CommandArgument bound property loses value on postback

    =?Utf-8?B?QmVuamFtaW4gSm9sZGVyc21h?=, Aug 21, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,107
    =?Utf-8?B?QmVuamFtaW4gSm9sZGVyc21h?=
    Aug 21, 2004
  3. Sathyaish
    Replies:
    3
    Views:
    3,096
    Sathyaish
    Sep 8, 2005
  4. Sathyaish

    Linkbutton does not look like a linkbutton

    Sathyaish, Sep 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    179
    Sathyaish
    Sep 8, 2005
  5. hisan
    Replies:
    1
    Views:
    1,313
    Dan Stromberg
    Jun 25, 2012
Loading...

Share This Page