Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert html to aspx

Tags:

html

asp.net

Is there any tool or code to convert HTML files to .ASPX?

Elaboration to earlier question: I am looking for tool or code that automatically converts HTML controls to .ASPX server controls without having to manually change each control, i.e., something that will take an HTML page as input, parse, and output as an .ASPX page with server controls.

like image 435
zeusmos Avatar asked Apr 23 '10 19:04

zeusmos


3 Answers

No conversion needed. Just change *.html to *.aspx.

If you want parts of the HTML page to become dynamic, there's more work involved then.

like image 127
Justin Niessner Avatar answered Sep 20 '22 00:09

Justin Niessner


No, ASP.NET code is embedded in your regular HTML code, so your default web pages will have the extension .aspx but there are a few other things you need to do to get a ASP.NET site up and running.

Check out this link with some help on how to get started with ASP.NET
http://www.asp.net/get-started/

Also, here's one of my favorite books on the subject that really helped me learn more about ASP.NET (you might want to find a version 4.0 book though if you are working with the new features of ASP.NET.)

like image 24
Robert Greiner Avatar answered Sep 21 '22 00:09

Robert Greiner


Its very simple to convert .html to .aspx

if you just change the extension from .html to .aspx ,

  1. Sometimes it leads to some unexpected exception handling, that says as , file cannot open or corrupted You will just have the filename.aspx page(design and source) BUT WILL not get the filenmae.aspx.vb page(coding).

So better follow these steps :

  1. Open the .html file in a notepad and copy the contents.

  2. Create a new webform in visualstudio (with masterpage)

  3. Goto source page and erase the default contents and paste the copied contents
  4. Save it. execute it .

Note(Imp): Do not forget to keep ur webform controls , jscripts, css(stylesheets), images(if any) within the project created

like image 21
Mano Avatar answered Sep 21 '22 00:09

Mano