metadata 0 Posted August 9, 2012 Report Share Posted August 9, 2012 (edited) I am new to asp and am wondering what extension you are supposed to use for an asp file. In some of the examples on the site it showed ".asp" as the extension for these files. An example below: <form method="get" action="simpleform.asp">First Name: <input type="text" name="fname" /><br />Last Name: <input type="text" name="lname" /><br /><br /><input type="submit" value="Submit" /></form> Now, is this what the filename's extension should actually be or should it be .html? I named my file with a .asp extension but I am unable to open it in notepad for editing so I'm thinking it should be .html. Thanks! Edited August 9, 2012 by metadata Quote Link to post Share on other sites
justsomeguy 1,135 Posted August 9, 2012 Report Share Posted August 9, 2012 ASP classic files should have a .asp extension, ASP.NET files should have a .aspx extension. Notepad will open any file you tell it to, even a binary file. It's not useful to open a binary file in Notepad, but it won't complain. Quote Link to post Share on other sites
metadata 0 Posted August 9, 2012 Author Report Share Posted August 9, 2012 Yes I see now, I missed something in opening the file using notepad. Quote Link to post Share on other sites
metadata 0 Posted August 9, 2012 Author Report Share Posted August 9, 2012 I have another question. I opened the file.asp with notepad and put the following code inside from an exaple on the site: <!DOCTYPE html><html><body><%response.write("Hello World!")%></body></html> The page that comes up in my browser displays the following: <% response.write("Hello World!") %> What does this mean? It should only display Hello World! if working properly. Thanks Quote Link to post Share on other sites
justsomeguy 1,135 Posted August 9, 2012 Report Share Posted August 9, 2012 That means that ASP isn't running. If you're double clicking on the file to open it, that doesn't work with server-side languages like ASP and PHP. They require a web server with the necessary software to execute the server-side code. You'll need to put that file on a web server that supports ASP and access it with a URL that starts with HTTP. Quote Link to post Share on other sites
metadata 0 Posted August 9, 2012 Author Report Share Posted August 9, 2012 Shouldn't Windows 7 have IIS already on it which basically turns a PC into a web server of sorts? Quote Link to post Share on other sites
justsomeguy 1,135 Posted August 9, 2012 Report Share Posted August 9, 2012 IIS isn't installed by default, if your version of Windows includes it then you can install it like this: http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.