Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

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

Edited by Mondeo
Posted

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.

Ignorance begins with I.
Posted

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!

Posted

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.

Ignorance begins with I.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...