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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| 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! |
| Sponsored Links |
| |||
| 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. |
| |||
| 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. |
| |||
| 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"; } } |
![]() |
| Thread Tools | |
| Display Modes | |
| |
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 |