B
Ben Amada
Hello,
A partner is going to be creating some HTML files that I plan on converting
to user controls (UC) and dynamically load at runtime. I'm guessing Visual
Studio doesn't come with some utililty to convert HTML files to UCs? IOW,
I'll have to manually convert each HTML file to a UC? I've never used user
controls before, so I'm wondering what I need to add and remove to each UC
(or HTML file) to make this work. For instance, I suppose I will need to
add an ASP.NET page directive to each UC and remove the <HTML>, <HEAD> and
<BODY> tags from each UC? What else do I need to add/remove? Is the
content of each ASCX just consist of the HTML that will be inserted into a
host ASPX page?
Also, I plan on adding some ASP.NET server controls (Labels, Image controls,
etc.) to the UC. Do I need to add a <Form runat="server"> tag to the ASCX
file if I'm going to be doing this? Lastly, since I'll be loading one of
these UCs dynamically, what do I put in the host ASPX file where the UC will
be loaded ... a placeholder? Or is there a less generic control I can add
to the host ASPX file - something like <asp:Control>?
Many questions Any answers are appreciated!
Thanks/Ben
A partner is going to be creating some HTML files that I plan on converting
to user controls (UC) and dynamically load at runtime. I'm guessing Visual
Studio doesn't come with some utililty to convert HTML files to UCs? IOW,
I'll have to manually convert each HTML file to a UC? I've never used user
controls before, so I'm wondering what I need to add and remove to each UC
(or HTML file) to make this work. For instance, I suppose I will need to
add an ASP.NET page directive to each UC and remove the <HTML>, <HEAD> and
<BODY> tags from each UC? What else do I need to add/remove? Is the
content of each ASCX just consist of the HTML that will be inserted into a
host ASPX page?
Also, I plan on adding some ASP.NET server controls (Labels, Image controls,
etc.) to the UC. Do I need to add a <Form runat="server"> tag to the ASCX
file if I'm going to be doing this? Lastly, since I'll be loading one of
these UCs dynamically, what do I put in the host ASPX file where the UC will
be loaded ... a placeholder? Or is there a less generic control I can add
to the host ASPX file - something like <asp:Control>?
Many questions Any answers are appreciated!
Thanks/Ben