Client side script ASP.NET

H

henk

Hi,

How can i eassely add client side script in my code. I have a sort of
TAB control, that works through postbacks but i want the action taken on the
client side. Thus when i click on a link a panel wil become visible or not
visible..


Thanks Henk
 
S

Scott M.

In the server-side code use attributes.add() on the server control in
question.

lblSomething.attributes.add("onClick","doSomething()")

And then you can hard code a client-script in the .aspx page called
"doSomething()"
 
H

henk

Thanks, thats just what i needed..


Scott M. said:
In the server-side code use attributes.add() on the server control in
question.

lblSomething.attributes.add("onClick","doSomething()")

And then you can hard code a client-script in the .aspx page called
"doSomething()"
 

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

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top