Convert html to aspx

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

Developing an earlier question: I'm looking for a tool or code that automatically converts HTML controls to .ASPX server elements without having to manually change each control, i.e. something that takes an HTML page as input, parsing, and output, like an .ASPX page with server controls.

+4
source share
3 answers

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

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

+6
source

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

Read this link for help on getting started with ASP.NET
http://www.asp.net/get-started/

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

+2
source

Its very simple to convert .html to .aspx

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

  • Sometimes this leads to some unexpected exception handling that says, file cannot open or corrupted You will only have the filename.aspx page (design and source), but WILL not get the filenmae.aspx.vb page (encoding).

So, better do the following:

  • Open your .html file in notepad and copy the contents.

  • Create a new webform in visualstudio (with main page)

  • Go to source and delete default content and paste copied content
  • Save it. execute it.

Note (Imp): Remember to save ur webform controls , jscripts , css(stylesheets) , images(if any) in the created project

0
source

Source: https://habr.com/ru/post/1307813/


All Articles