Calling javascript from a component

M

Marius Horak

Hi,

I have a component.
It will create a number of tables and buttons.
When a button is pressed it executes code and next it has to execute some
javascript.
All this code (javascript) has to be inside that component. I cannot add
javascript to a page. (this component is being used on a number of pages).
Have no idea how to do it.

Thanks

MH
 
V

Victor Garcia Aprea [MVP]

Hi Marius,

You can use the Page.Register* methods from your control to output
javascript from your controls without the need of having the javascript
hardcoded in the page. Is that what you're looking for?

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.
 

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

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,206
Latest member
Zenden

Latest Threads

Top