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?
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.
Solution 1. If you want to show it in the same page, you can just paste the contents of the html body between your panels. If your html content will change in future, and you want it to remain a different page, use an iframe and set it to display your html page.
Solution 1Open the ASPX page in a web browser such as Firefox or Google Chrome, and choose 'Save As' - you should have the option to save the page as an HTML file.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With