Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET Extensions
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 18-Oct-12 0:01am
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 at 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  
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
0 OriginalGriff 290
1 Jochen Arndt 165
2 DamithSL 125
3 PIEBALDconsult 110
4 Garth J Lancaster 90
0 OriginalGriff 5,790
1 DamithSL 4,601
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,195


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 1 Jul 2014
Copyright © CodeProject, 1999-2014
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