Results 1 to 9 of 9

Thread: How to convert .aspx file to .html file in a output

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Smile How to convert .aspx file to .html file in a output

    Hi Friends,

    I have one doubt that how to convert .aspx file to .html file in asp.net. I am writing a code in a asp.net using c#.In the browser the output displayed by .aspx files.But i want to convert .html and view the browser in html file.Is it possible?

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: How to convert .aspx file to .html file in a output

    Quote Originally Posted by Guvera
    Hi Friends,

    I have one doubt that how to convert .aspx file to .html file in asp.net. I am writing a code in a asp.net using c#.In the browser the output displayed by .aspx files.But i want to convert .html and view the browser in html file.Is it possible?
    Why will you do that? The ASPX file is rendered as HTML on the clients browser, so what is the need of converting it to HTML file?
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to convert .aspx file to .html file in a output

    You're not making a lot of sense, but could you perhaps mean that you want it to execute with the codebehind but use a .html extension? Then perhaps what you need is URL rewriting.

  4. #4
    Lively Member lekhuyen's Avatar
    Join Date
    May 2006
    Posts
    80

    Re: How to convert .aspx file to .html file in a output

    I'm sorry mendhak. what is URL rewriting? is it a library in vs2005?
    Last edited by lekhuyen; Jun 10th, 2007 at 09:20 PM.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to convert .aspx file to .html file in a output

    URL rewriting is a way of 'mapping' a non-existent URL to an actual URL. For example, you may have www.site.com/products/products.aspx?type=jeans

    To make it more search engine friendly, one may want to turn this into a URL such as:

    www.site.com/products/jeans.html

    jeans.html won't actually exist, but your URL Rewriting procedure will take care of that URL and make sure it maps to products.aspx?type=jeans

    It is a 'feature' of ASP.NET

  6. #6
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308

    Re: How to convert .aspx file to .html file in a output

    Quote Originally Posted by Guvera
    Hi Friends,

    I have one doubt that how to convert .aspx file to .html file in asp.net. I am writing a code in a asp.net using c#.In the browser the output displayed by .aspx files.But i want to convert .html and view the browser in html file.Is it possible?
    Do you want to fetch the rendered HTML out of an .aspx page?

  7. #7
    Lively Member lekhuyen's Avatar
    Join Date
    May 2006
    Posts
    80

    Re: How to convert .aspx file to .html file in a output

    Quote Originally Posted by mendhak
    URL rewriting is a way of 'mapping' a non-existent URL to an actual URL. For example, you may have www.site.com/products/products.aspx?type=jeans

    To make it more search engine friendly, one may want to turn this into a URL such as:

    www.site.com/products/jeans.html

    jeans.html won't actually exist, but your URL Rewriting procedure will take care of that URL and make sure it maps to products.aspx?type=jeans

    It is a 'feature' of ASP.NET
    Oh, yes. Thank you, Mendhak.
    I wonder vs 2005 have this feature or not? If they have, which namespace or class will do that for me?
    Can you tell me, Mendhak?

  8. #8
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    Re: How to convert .aspx file to .html file in a output



    If this post helps, please RATE MY POST!

    Using Visual Studio 2005 SE

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to convert .aspx file to .html file in a output

    Since you're using VS 2005, in other words, ASP.NET 2.0, keep in mind the new feature: URL Mapping.

    This is very similar to URL Rewriting, except that you are explicitly giving one to one mappings. If you have just one or two URLs to be rewritten, use URL Mapping. Else, use URL Rewriting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width