How to Configure HTML as an ASPX Mime Type
Hypertext Markup Language (HTML) provides a standard layout from which web browsers are able to display website pages to users. HTML is static, which means it only displays information that does not change according to user input. The ASPX file extension is Microsoft's .NET language, which is dynamic. You can translate your HTML pages to the ASPX MIME type by adding prefixes to each HTML element.
Instructions
-
-
1
Right-click your HTML page and select "Open With." Select "Notepad" from the list of programs. You can also edit these tags in more advanced editors such as Visual Studio.
-
2
Find one of your HTML controls. For instance, a button can be converted to an ASPX format. Press your "Ctrl" key and then press the "F" key. In the text box, enter "input" and click "Find." This command runs through your file to find input elements. Find one that has "type='button'" in the tag to convert it to ASPX.
-
-
3
Change the input tag to an ASPX server control. There are several ASPX tags that correspond to HTML tags (see Resources). Enter the following code to convert a button to ASPX:
<asp:button id="mybutton />
-
4
Insert the "runat" property. The runat property directs the server to run the code on the server instead of the client machine. The following completes the tag conversion, which you must do to each HTML element in your file:
<asp:button id="mybutton runat="server" />
-
5
Click "File" and then "Save As." Change the file extension from "HTML" to "ASPX" and click "Save."
-
1
References
Resources
- Photo Credit computer keyboard image by forca from Fotolia.com