ASPX extension

Mondeo

Centurion
Joined
Nov 10, 2006
Messages
128
Location
Sunny Lancashire
Hi,

Is there anyway to use ASP.NET runat=server code within a page with a standard .html extension.

I just wondered becuase i've got a small job to do on 1 page on a plain html site and i'd like to keep all the page extensions consistant. (its just a contact us form)

Thanks
 
Last edited:
Mondeo,
I don't think this is possible. I think you can make the extension anything, the server reads the page by it's header info. It also must run on an ASP.Net Server or it won't run. If it is email you are trying to send, I believe you can just use java. You can also use plain old <%ASP%> within your .html document, this is not an .aspx dependent page. Hope this helps.
 
Hi Nate,

I'm not sure if thats a yes or a no lol. You say you dont think its possible but then you said that the extension can be anything as long as its running on an asp.net server (which it is)

Are you saying that whatever the extension the asp.net engine will read the header of the page and process any script automatically?

Sorry for being confused!
 
Sorry for the confusion. It seems odd that the extensions would matter, if you are running an ASP.net server with the proper version you can run either an ASP.net page which has an extension of .aspx (and I believe you can change the extension and it will work fine as long as IIS is set up correctly and that it is not your index page) or you can simply use old ASP in your html document using the <% %> tags. I haven't tried the first one so don't quote me on it, ha ha. IIS should read the header of the page reguardless of the extension.

Do you have a page already done in .Net, or do you just prefer to use it? If the site is not too big, lol, you might just consider making it all .Net. It is much more powerful anyway. Hope this helped.
 
Back
Top