java client side

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

Hi,

in a .net web appl (codebehind) when I push a button I want to do javascript
stuff on the CLIENT side and then go on with the codebehind coding of the
button (or maybe another proc) on the SERVER side.
Is that possible? I can't get it to work with doPostback
Thanks
Frank
 
Scott,
I put this in the HTML? So I have two page_loads, one in the HTML and one in
the codebehind?
Frank
 
No, your Page_Load should only exist in the codebhind. Since this is server
code and will execute before the final page is rendered, the instruction
here to add a client-side handler will be placed into the resulting HTML
element delivered to the client machine.
 
Scott,

that leaves me with the problem that I don't have the method addhandler for
the control. The control is defined as:

Protected WithEvents btnBestel As System.Web.UI.WebControls.Button

Intellisense doesn't show addhandler and putting it there anyway gives an
error.

Greets

Frank
 
Back
Top