Click here to Skip to main content
13,050,617 members (83,456 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
Hello FRIENDS,

Have a GOOD DAY ALL OF YOU.

I have Created a WEBSITE in Asp.net C#, SqlServer 2005.

My Requirement is I dont want to Display the Extension .aspx in browser.

For Example i have Products.aspx page....
fom these I want to display the produts in browser.


Please help me.

Thank you Friends.
Posted 17-Oct-12 23:01pm
Comments
cutesakshi 30-Jun-17 3:04am
   
Hello, Yes I also want hide Extension.aspx from my website
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

u have to use routing to implement this.

visit:
http://msdn.microsoft.com/en-us/library/cc668201(v=vs.100).aspx[^]
  Permalink  
Comments
Ranjith Reddy CSE 18-Oct-12 5:07am
   
am unable to understand, Please can you tell me in detail.

Please help me. THANKS.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

You need to apply URL Rewriting to achieve this....
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

Try this in web.config file


 
<configuration>
<system.webserver>
<rewrite>
<rules>
    <rule name="extensionless" stopprocessing="true">
          <match url="(.*)\.html$" />
          <action type="Redirect" url="{R:1}" redirecttype="Permanent" />
    </rule>
    <rule name="removeextension" enabled="true">
        <match url=".*" negate="false" />
            <conditions>
                <add input="{REQUEST_FILENAME}" matchtype="IsFile" negate="true" />
                <add input="{REQUEST_FILENAME}" matchtype="IsDirectory" negate="true" />
                <add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
            </conditions>
            <action type="Rewrite" url="{R:0}.html" />
    </rule>
</rules>
</rewrite>
</system.webserver>
</configuration>
  Permalink  
Comments
Member 11479841 7-Mar-15 10:08am
   
i did it but its showing extension .what i have to do plz anybody help me....
cutesakshi 30-Jun-17 3:23am
   
This Code is not Working
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 7

<pre lang="CSS"><pre lang="HTML"><pre lang="SQL"><pre lang="PHP"><pre lang="vb"><pre lang="xml"><pre lang="Delphi"><pre lang="F#">
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 9

Hi, you have to use URL Rewriting. Plz refer the below link:
http://msdn.microsoft.com/en-us/library/ms972974.aspx[^]
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 10

Hello

Implement the URL re-writing to achieve this.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 1 Jul 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100