views:

281

answers:

2

I have an .aspx page that can perform a number of functions. The type of function is determined at run-time depending on which button the user clicks. This makes makes a web-service call to an .asmx method. The web-service call returns html and javascript which then become part of the original page.

This new content has javascript events attached to button clicks, data validation etc. In turn these events then call their own web-service methods in another .asmx file. The main page does not know about these other .asmx files when the page loads.

So, is there any way of dynamically loading these .asmx files on demand?

A: 

You can create an assembly dynamically from the webservice, we do this where I work. Check out this codeproject link for an example that you can work from.

(disclaimer, I only gave the codeproject page a quick once over to see that it should be a good start for what you want, it's along the same lines of what we do)

Andrew Barrett
A: 

"ASMX files" are not loaded. They are files which define ASMX web services - which area called. You don't need to load these files.

John Saunders