Problem in converting HTML page to user control
-
Hello all, I have two queries related to user control. One, how can i include a .js and .css file in an .ascx page? Are we allowed to use tag, if yes then can I just include them as usual by using tag? Two, I have an HTML(not aspx) page which i want to convert to a user control. I have javascript functions being called on the "load" and "onmousedown" event for the body of the HTML page. But since user contriol do not have body so how do I implement it...? Please help...
-
Hello all, I have two queries related to user control. One, how can i include a .js and .css file in an .ascx page? Are we allowed to use tag, if yes then can I just include them as usual by using tag? Two, I have an HTML(not aspx) page which i want to convert to a user control. I have javascript functions being called on the "load" and "onmousedown" event for the body of the HTML page. But since user contriol do not have body so how do I implement it...? Please help...
om pr wrote:
One, how can i include a .js and .css file in an .ascx page? Are we allowed to use tag, if yes then can I just include them as usual by using tag?
Yes you can do that. Or you can include them in the page where you will use them.
om pr wrote:
Two, I have an HTML(not aspx) page which i want to convert to a user control. I have javascript functions being called on the "load" and "onmousedown" event for the body of the HTML page. But since user contriol do not have body so how do I implement it...?
HTML you can convert to user controls. Since it doesn't have a body tag, you should call OnLoad events inside the page where you use them.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions