Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Problem is I can't load html file in the ascx. my html file has a javascript. Is that possible that the program can still use the javascript in html. which the html is inside the ASP.Net ascx file?
Posted
Updated 23-May-11 14:55pm
v2
Comments
Sergey Alexandrovich Kryukov 23-May-11 21:00pm    
Hm. Not clear. Why doing it with Javascript and what will you do with the result of it. Why not posting it to the server side?
--SA
Matt Jun 23-May-11 21:05pm    
I already have an HTML File which contains image mapping with javascript on it. So I am thinking if it possible that the javascript I used in HTML file will run in ASP.Net?
Manfred Rudolf Bihy 23-May-11 21:33pm    
If you're talking about executing javascript on the server side: Yes it can be done and NO it is definitely not worth the trouble. You'd have to set up an environment that would run the javascript and at the same time make sure that this environment can be accessed by many threads (the separate requests the server handles in parallel). It'll be easier for you to rewrite that code to C# than setting up the scenario I just sketched. Really!

1 solution

Still your question not clear. But generally if you do have externally resources such(html page, pdf file, even external web site), you can reference them using <iframe></iframe> tag.

E.g
XML
<iframe src="~/yourhtmlFile.htm" />


I hope this helps you well.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900