0

i have a about.html page in my application.

i want to give this page routing for that i use this code in global file

 RouteTable.Routes.MapPageRoute("AboutUs", "aboutus", "~/about.html");

but it gives me error like

There is no build provider registered for the extension '.html'. You can register one in the section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.

can anyone help me to give routing to this html page in asp.net not in mvc

thanks in advance

1
  • i have mentioned clearly what i want. can you help me for html page in asp.net ? not in mvc Commented Aug 4, 2013 at 16:49

1 Answer 1

1

Try to replace .html by .aspx:

routes.MapPageRoute("", "AboutUs/", "~/AboutUs.aspx");

This question can give you more details.

Update:

If you want to remove the extension check here

Sign up to request clarification or add additional context in comments.

2 Comments

but i don't want to convert that page with .aspx , i want to use it as .html page only
Check at my update, you can just remove the extension of your files in IIS instead of adding a new route for each single page.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.