button does not work upon clicking

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default button does not work upon clicking

    Hi,

    I have 3 buttons on a asp.net page. They are exactly the same except
    for the name. Two of the buttons works but the third one does not
    respond to the clicking. Here is the code:

    <tr>
    <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    5px">
    <INPUT class="tabButton" id="cmdGenSetup" align="left"
    width="140" type="button" value="General Info" name="cmdReqFields"
    runat="server">
    </td>
    </tr>
    <tr>
    <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    5px">
    <INPUT class="tabButton" id="cmdConnSetup" align="left"
    width="140" type="button" value="Connection Setup" name="cmdOptFields"
    runat="server">
    </td>
    </tr>
    <tr>
    <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    5px">
    <INPUT class="tabButton" id="cmdTrxSetup" align="left"
    width="140" type="button" value="Transaction Setup" runat="server"
    name=cmdOptFields1>
    </td>
    </tr>

    The Event handling code is also very similare except for the name.
    Please help me to find out why the third button does not working.
    Thanks!

    David
    David Guest

  2. Similar Questions and Discussions

    1. Send form by clicking button (by email)
      Hello, how can i send an email by clicking a button? This action should take al data from the fields and send this to an emailaddress... ...
    2. Double clicking submit button - duplicates
      Hi there, I have a DW insert record behaviour on a php page. If the user clicks Submit quickly multiple times, I end up with duplicate records. Any...
    3. how to keep people from 'clicking' on my rollover button
      when a client clicks on my rollover button (only intended to show a second image) she gets a PAGE NOT FOUND. This is terrible. HELP. If a...
    4. Calling av function when clicking a button
      Hi! I have made a function calles "send()". When I click a button, I want the function to be prosessed. This is the code that I have made, but...
    5. hourglass when clicking button?
      is there a way to display an hourglass for the client's cursor when clicking a button running server-side code? thanks.
  3. #2

    Default Re: button does not work upon clicking

    Hard to say from what you posted. Did you by accident delete the code for
    the button that doesn't work, does it not post back to server, or did you
    accidentally "detach" the event handler for the click event?

    --
    Carsten Thomsen
    Enterprise Development with Visual Studio .NET, UML, and MSF
    [url]http://www.apress.com/book/bookDisplay.html?bID=105[/url]
    "David" <huayuli@yahoo.com> wrote in message
    news:c1708ee0.0308011409.58f4beba@posting.google.c om...
    > Hi,
    >
    > I have 3 buttons on a asp.net page. They are exactly the same except
    > for the name. Two of the buttons works but the third one does not
    > respond to the clicking. Here is the code:
    >
    > <tr>
    > <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    > 5px">
    > <INPUT class="tabButton" id="cmdGenSetup" align="left"
    > width="140" type="button" value="General Info" name="cmdReqFields"
    > runat="server">
    > </td>
    > </tr>
    > <tr>
    > <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    > 5px">
    > <INPUT class="tabButton" id="cmdConnSetup" align="left"
    > width="140" type="button" value="Connection Setup" name="cmdOptFields"
    > runat="server">
    > </td>
    > </tr>
    > <tr>
    > <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    > 5px">
    > <INPUT class="tabButton" id="cmdTrxSetup" align="left"
    > width="140" type="button" value="Transaction Setup" runat="server"
    > name=cmdOptFields1>
    > </td>
    > </tr>
    >
    > The Event handling code is also very similare except for the name.
    > Please help me to find out why the third button does not working.
    > Thanks!
    >
    > David

    CT Guest

  4. #3

    Default Re: button does not work upon clicking

    The followings are the code. Most of the irrelevant code are removed
    to make the reading easier. I also viewed the source code of this page
    from IE and found that only the first two buttons has onclick methods.
    Thanks for any help!!


    <form id="Setup" method="post" runat="server">
    <table>
    <tr>
    <td >
    <table>
    <tr>
    <td>
    <INPUT class="tabButton" id="cmdGenSetup" align="left"
    width="140" type="button" value="General Info" name="cmdReqFields"
    runat="server"> </td> </tr>
    <tr>
    <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP: 5px">
    <INPUT class="tabButton" id="cmdConnSetup" align="left" width="140"
    type="button" value="Connection Setup" name="cmdOptFields"
    runat="server"> </td>
    </tr>
    <tr>
    <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP: 5px">
    <INPUT class="tabButton" id="cmdTrxSetup1" align="left" width="140"
    type="button" value="Transaction Setup" name="cmdOptFields"
    runat="server">
    </td>
    </tr>
    </table>
    </td>
    <td >
    <div>
    <!-- some other code in here --> </div>
    </td>
    </tr>
    </table>
    </form>
    "CT" <carstent@spammersgowaydotnetservices.biz> wrote in message news:<eh07xhYWDHA.3220@tk2msftngp13.phx.gbl>...
    > Not at all sure what's going on here. Are you sure the third button is
    > contained in the form? Perhaps if we can see the full page, it might be
    > easier. Be careful, if the page is too big, don't paste it into your reply,
    > rather send it directly to me.
    >
    David Guest

  5. #4

    Default Re: button does not work upon clicking

    Can you post your eventhandlers?

    Dawn.


    [email]huayuli@yahoo.com[/email] (David) wrote in message news:<c1708ee0.0308011409.58f4beba@posting.google. com>...
    > Hi,
    >
    > I have 3 buttons on a asp.net page. They are exactly the same except
    > for the name. Two of the buttons works but the third one does not
    > respond to the clicking. Here is the code:
    >
    > <tr>
    > <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    > 5px">
    > <INPUT class="tabButton" id="cmdGenSetup" align="left"
    > width="140" type="button" value="General Info" name="cmdReqFields"
    > runat="server">
    > </td>
    > </tr>
    > <tr>
    > <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    > 5px">
    > <INPUT class="tabButton" id="cmdConnSetup" align="left"
    > width="140" type="button" value="Connection Setup" name="cmdOptFields"
    > runat="server">
    > </td>
    > </tr>
    > <tr>
    > <td align="right" style="PADDING-LEFT: 10px; PADDING-TOP:
    > 5px">
    > <INPUT class="tabButton" id="cmdTrxSetup" align="left"
    > width="140" type="button" value="Transaction Setup" runat="server"
    > name=cmdOptFields1>
    > </td>
    > </tr>
    >
    > The Event handling code is also very similare except for the name.
    > Please help me to find out why the third button does not working.
    > Thanks!
    >
    > David
    HrtgSkr Guest

  6. #5

    Default Re: button does not work upon clicking

    Hi,


    Every control needs a line in the Form_init (InitializeComponent) that
    bind event handler to event. I bet that the control that don’t work is
    missing this binding.

    this.Button1.ServerClick += new
    System.EventHandler(this.Button1_ServerClick);

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139