Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello
am create a html page as a Home Page Layout in MVC. After Click on Project Set Specific page and Give index.html page .HTML page work on local machine but when i upload it on server that no working its self
When is enter full URL then Page Work
My Problem is
I want to create a simple html page and call in on first and here am facing issue how to call layout + sign in view on Href tag

What I have tried:

Create a static page without MVC layout
Posted
Updated 8-Jan-17 21:18pm
Comments
What is the url you are trying? Is it something like www.yourdomain.com/Home?
Arslan saif 9-Jan-17 3:11am    
page name index.html
when i write full url then page work
otherwise i want to use this page like when write domaain like www.google.com i want this page on this

1 solution

Hello:
The default controller is Home and the default action is Index, so when you open the application with http://yoursite.com automatically is used the controller Home and the tion is Index, as if you will be used http://yoursite.com/Home/Index.
So if you want to show a "index.htm" page in this case you can use this code in the Home controller.
<br />
   public ActionResult Index()<br />
   {<br />
       return RedirectPermanent("~/index.htm");<br />
   }<br />

I hope this will help you
 
Share this answer
 
Comments
Arslan saif 9-Jan-17 3:21am    
thanks u very very much

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