javascript for aspButtons

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
 
S

Steve C. Orr [MVP, MCSD]

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top