Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
4.00/5 (4 votes)
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
Updated 7-Sep-17 1:58am

u have to use routing to implement this.

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

Please help me. THANKS.
 
Share this answer
 
v2
You need to apply URL Rewriting to achieve this....
 
Share this answer
 
Try this in web.config file


XML
<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>
 
Share this answer
 
Comments
Member 11479841 7-Mar-15 10:08am    
i did it but its showing extension .what i have to do plz anybody help me....
Hi, you have to use URL Rewriting. Plz refer the below link:
http://msdn.microsoft.com/en-us/library/ms972974.aspx[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900