Check for button click in page load...

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

  1. #1

    Default Check for button click in page load...

    Hey,

    I have an interesting problem that I need some assistance for...

    It is my understanding that when you click a button on an ASP.NET page, it
    will actually run the page load first and then run my button procedure. Is
    there a way, that I can check to see if the button was clicked in the *page
    load* before the code ever gets to my button procedure?

    Mainly, I have some dynamic textboxes that I need to reset if a person
    selects a radiolist, however, if they select the submit button, I don't want
    to reset the textboxes.

    Thanks for your help,
    Bob



    Bob Erwin Guest

  2. Similar Questions and Discussions

    1. Would like to load a datagrid already in edit mode instead of having the user click the edit button
      Now my asp.net datagrid shows an edit button and clicking it puts the datagrid in edit mode. I would like to: 1) possilby load the page already...
    2. WWW::Mechanize click($button) not finding right button to click
      Based on wise advice from participants of this forum, I rewrote my web automation script using WWW::Mechanize. The script now successfully logs...
    3. PHP check click
      I have a page and a sponsor. Every time a user click on a banner from our sponsor their webpage is opened. I'd like to reward these users, but how...
    4. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
    5. after logout, how to retrieve an expired page if user click 'back' button?
      hi everyone, i've made a login and logout page, after user have logout, i want to retrieve an expired page if user click the 'back' button to...
  3. #2

    Default Re: Check for button click in page load...

    Hi,

    1) If you look at the Form.Keys collection you will found only the
    Button ID
    that cause the postback.

    2) RaisePostBackEvent is a method that you need to overload :
    override protected void RaisePostBackEvent ( IPostBackEventHandler
    sourceControl,
    string eventArgument)
    {
    string s ((WebControl)sourceControl).ID ;
    }


    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** 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