Webcontrol toolbar image click question

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

  1. #1

    Default Webcontrol toolbar image click question

    Hi all,

    Firstly, allow me to just say that programming asp.net AND using viewstate
    has been (and still is at the moment) the most painful experience I have
    ever undergone. It really is!

    Now that I've got that behind me (not that it's going to make viewstate work
    for me) I really have a problem I need urgent help with.

    I have realized that I need to somehow populate a hidden client-side field
    when I click on an image which is on a toolbar control. The reason for this
    is because I need to access this variable as soon as my main page page_load
    event fires so I can use the Loadcontrol at that stage. Doing it like this
    (and not in the button_click event of the toolbox, 'cause it don't work), I
    found I can get access to the viewstate.

    So please, how can I execute a little Javascript once I click on a
    toolbarbutton?

    Regards
    John.


    John Guest

  2. Similar Questions and Discussions

    1. WebControl Click Event Not Firing
      I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force...
    2. WebControl, to select part of a web-image.
      Hi, I'm looking for an ASP.NET web-control in wich I can show a generated image to user, the user should then be able to select part of the...
    3. disable image toolbar help
      Is there a way to disable image toolbar. So that a viewer wont be able to save an image or print it? I have diabled the right click be that doesnt...
    4. image toolbar
      I asked this question a zillion years ago.... And today I found I wanted to use it and it didn't work. I don't want the little image toolbar to come...
    5. Image Button in Datagrid WebControl
      in your itemdatabound or itemcreated event handler just add a label control or any control that will take a url tag to the cell. then add the image...
  3. #2

    Default Re: Webcontrol toolbar image click question

    Hi Rory,

    The toolber button does not have an attributes property...

    Regards
    John.

    "Rory" <rory@vivid-design.com.au> wrote in message
    news:032101c35a38$87568a90$a401280a@phx.gbl...
    > You can add attributes to buttons. So use this to add
    > an 'onclick' attribute to your toolbar button that
    > executes a jscript.
    >
    > eg
    > mybutton.Attributes("OnClick") = "JavaScript:alert
    > ('hello');"
    >
    >
    >
    > >-----Original Message-----
    > >Hi all,
    > >
    > >Firstly, allow me to just say that programming asp.net
    > AND using viewstate
    > >has been (and still is at the moment) the most painful
    > experience I have
    > >ever undergone. It really is!
    > >
    > >Now that I've got that behind me (not that it's going to
    > make viewstate work
    > >for me) I really have a problem I need urgent help with.
    > >
    > >I have realized that I need to somehow populate a hidden
    > client-side field
    > >when I click on an image which is on a toolbar control.
    > The reason for this
    > >is because I need to access this variable as soon as my
    > main page page_load
    > >event fires so I can use the Loadcontrol at that stage.
    > Doing it like this
    > >(and not in the button_click event of the toolbox, 'cause
    > it don't work), I
    > >found I can get access to the viewstate.
    > >
    > >So please, how can I execute a little Javascript once I
    > click on a
    > >toolbarbutton?
    > >
    > >Regards
    > >John.
    > >
    > >
    > >.
    > >

    John Guest

  4. #3

    Default Re: Webcontrol toolbar image click question

    If you are experiencing pain programming in asp.net you are definitely doing
    something wrong.
    and that's the truth.

    "John" <a@b.com> wrote in message
    news:u6aVP9hWDHA.2376@TK2MSFTNGP11.phx.gbl...
    > Hi all,
    >
    > Firstly, allow me to just say that programming asp.net AND using viewstate
    > has been (and still is at the moment) the most painful experience I have
    > ever undergone. It really is!
    >
    > Now that I've got that behind me (not that it's going to make viewstate
    work
    > for me) I really have a problem I need urgent help with.
    >
    > I have realized that I need to somehow populate a hidden client-side field
    > when I click on an image which is on a toolbar control. The reason for
    this
    > is because I need to access this variable as soon as my main page
    page_load
    > event fires so I can use the Loadcontrol at that stage. Doing it like this
    > (and not in the button_click event of the toolbox, 'cause it don't work),
    I
    > found I can get access to the viewstate.
    >
    > So please, how can I execute a little Javascript once I click on a
    > toolbarbutton?
    >
    > Regards
    > John.
    >
    >

    Alvin Bruney 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