开发者

how to render a .htm page into .aspx page

i have aspx page which has to render .htm page how can it be done

if possible then i want added fea开发者_C百科ture that is i want to call a JavaScript after that .htm page is rendered

pls help


If you were to just serve the original file, you could:

Response.Clear();
Response.WriteFile(localPathToHtmFile);

As you instead want to modify it, and assuming you need to stick to the full file, then you'd have to do some light parsing of it to add the script you want ran when the page is loaded in the browser. Instead of using WriteFile, you'd write the modified string to the response.

Another option, if you can have that file only include the html inside the body, is to load it in a literal control. Then you have the regular options to send / have the intended script to be ran at page load.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜