IT Community - Software Programming, Web Development and Technical Support

How to change aspx page to html page?

This is a discussion on How to change aspx page to html page? within the ASP and ASP.NET Programming forums, part of the Web Development category; Hi all, I'm having a big doubt , How to run .aspx has .html(on client end as .html) like ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-28-2007, 11:22 PM
S.Vinothkumar S.Vinothkumar is offline
D-Web Genius
 
Join Date: May 2007
Posts: 1,061
S.Vinothkumar is on a distinguished road
Question How to change aspx page to html page?

Hi all,

I'm having a big doubt ,

How to run .aspx has .html(on client end as .html)

like All web pages will return to client end as .html but the site will be dynamic... using Aspx.. in the browser it should show only .html
__________________
S.VinothkumaR
Behind me is infinite power,
Before me is Endless Possibility,
Around me is Boundless Opportunity,
Why should I fear!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-10-2007, 03:29 AM
mobilegeek mobilegeek is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 205
mobilegeek is on a distinguished road
Smile Re: How to change aspx page to html page?

Your server should have been setup with .NET 2.0

You will need to do that before any .NET page will show the proper results...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-11-2007, 11:53 PM
Mramesh Mramesh is offline
D-Web Sr.Programmer
 
Join Date: Sep 2007
Location: Chennai
Posts: 106
Mramesh is on a distinguished road
Send a message via MSN to Mramesh
Smile Re: How to change aspx page to html page?

I think you want to rename your .aspx file to .html file.


No, not without root/admin access to the webserver, and even then it may not be possible. Supposedly you can do it by playing with ISAPI filters, although I was not able to do it myself.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-15-2007, 11:32 PM
leoraja8 leoraja8 is offline
D-Web Sr.Programmer
 
Join Date: May 2007
Posts: 194
leoraja8 is on a distinguished road
Smile Re: How to change aspx page to html page?

Hi there is a way I Know but I dont know if it is valid for .html.

There is a control on .NET 2.0 which is named as URLMapPath control. With this control you can create virtual urls which are linked to original ones. By this way you can hide query urls from visitor. You may use this control for your need.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-26-2007, 11:46 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Smile Re: How to change aspx page to html page?

SimplePageInheritance.aspx
<%@ Page language="c#" Codebehind="SimplePageInheritance.aspx.cs" AutoEventWireup="false"
Inherits="SimplePageInheritance" %>
<form id="SimplePageInheritance" method="post" runat="server">
<h1>This is Page 1</h1>
<p>
This page demonstrates Simple Page Inheritance where the content is rendered
using the base class' Render() method. You cannot use Server Controls that
postback in the base class, they can only be used in the .ASPX page itself.
</p>
</form>

SimplePageInheritance.aspx.cs
using System;
using System.Web.UI;
public class PageBase : System.Web.UI.Page
{
private string _pageTitle;
public string PageTitle
{
get { return _pageTitle; }
set { _pageTitle = value; }
}

protected override void Render(HtmlTextWriter writer)
{
// First we will build up the html document,
// the head section and the body section.
writer.Write( @"
<html>
<head>
<title>" + PageTitle + @"</title>
</head>
<body>" );

// Then we allow the base class to render the
// controls contained in the ASPX file.
base.Render( writer );

// Finally we render the final tags to close
// the document.
Writer.Write( @"
</body>
</html>" );
}
}

public class SimplePageInheritance : PageBase
{
public SimplePageInheritance()
{
PageTitle = "Simple Page Inheritance";
}
}
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' poornima ASP and ASP.NET Programming 1 03-05-2008 03:12 AM
How to bind two master pages in a aspx page ? oxygen ASP and ASP.NET Programming 1 02-14-2008 08:35 PM
If any possible for Html page encrypt sathian HTML, CSS and Javascript Coding Techniques 1 12-03-2007 08:52 PM
how to find the html page weight? varghese HTML, CSS and Javascript Coding Techniques 0 10-17-2007 01:04 AM
How to get all the links on a HTML page with javascript? a.deeban HTML, CSS and Javascript Coding Techniques 1 08-10-2007 06:32 AM


All times are GMT -7. The time now is 06:29 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0