How to convert an HTML page to .ASPX page and add/Remove Controls to it without changing the layout of the page

StackOverflow https://stackoverflow.com/questions/14450688

Question

Hello I'm a newbie for ASP.NET

I have a designed html page from another program, I want to convert the html into a asp.net aspx web form using visual web developer.

I have opened the page normally but it's difficult to move or replace controls in layout page, for example when I move a button, the design of page collapses. How I can insert button or textbox into a aspx/html on Visual web Developer 2010 without changing the layout of the page?

Was it helpful?

Solution

To convert an html page into aspx page,

1. Create a new web form in visual web developer.
2. Copy the content from body of the html file , paste it in body of the aspx page.
3. Similarly copy the script, meta tags from head section of html , paste it in head    section of aspx page.
4.if any external style sheet,Images included with html file, add them appropriately in a folder of your asp.net application.
5.Now try to run the page and check if everything appears well, if not appearing well check the stylesheet and make some small changes.
6.Check at the top of the page asp.net , <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> it is necessary.

Practice will give you perfection in css , styling and HTML.

-------------------All should be well--------------

If you don't find any controls in code behind , add [runat="server"] attribute in markup. and is an html control and is server control.


Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top