javascript for aspButtons

  • Thread starter Thread starter KK
  • Start date Start date
K

KK

Hi

Is it possible to attach javascript to an asp button? Lets say the basic
requirement is to
load another page to "frame1" upon clicking the button. Normaly we can use a
normal html
button and use javascript. Is it possible to use an webcontrol button to do
the same?

Also I couldn't found a way to refer to frames in my web application through
code. If I go to code behind files , how can I refer to a frame? with client
side javascript we can do that easily.

regards
KK
 
You cannot refer to a frame directly from server side code; this must be done with client side code.



You can just use a bit of HTML like this:

<BUTTON id="mybutton" onclick="myscript_onclick"

name="mybutton" type="button" value="Button">

Click Me</BUTTON>
 
Back
Top