Results 1 to 38 of 38

Thread: [RESOLVED] Why is this simple code not working?

Threaded View

  1. #26
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Why is this simple code not working?

    Quote Originally Posted by HowTo View Post
    still the button2 click causes the postback
    This:

    Code:
    <head runat="server">
        <title></title>
        <script language="javascript" type="text/javascript">
            function HowToreset() {
                return false;
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:Button ID="Button1" runat="server" Text="Reset" OnClientClick="return HowToreset()" />
            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        </div>
        </form>
    </body>
    Does not cause a PostBack.

    i.e. watch the names that you are using for your functions.

    Gary

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