Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Bootstrap CSS in ASP.NET web forms
Message
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01576247
Message ID:
01576450
Views:
24
>>>>>>>>You can't see it directly in a browser. You need to run the app.
>>>>>>>
>>>>>>>'View in Page Inspector' ?
>>>>>>>
>>>>>>
>>>>>>I think Craig has a point. I created an ASP.NET MVC Empty Application, added an HTML page to the View. The HTML Page is almost empty. When I try to View the page in Page Inspector I get error "Server Error in '/' Application. The resource cannot be found. HTTP 404".
>>>>>>So the Page Inspector is not very helpful.
>>>>>
>>>>>Did you wire up the View to a controller ?
>>>>
>>>>No I did not. And I am reading all your, Craig's, and Mike's messages trying to understand what and how to do it. Thank you.
>>>
>>>Somewhere back there, in a post to Craig, I showed the steps I took. Seems like the Page Inspector is smart enough to associate the View with the relevant controller action (i.e. if the Controller is not there to instantiate the View it won't work)....
>>
>>I will track down your message to Craig. Another thing that I could be missing is the name of the HTML. Somewhere I remember reading (or seeing in a training) that each view has to have a "specific" name. Maybe starting with the word "View"?
>
>If you don't specifically specify the View in the Controller it will look for a View with the same name as the method. e.g. Controller:
public ActionResult Login()
>        {
>            return View();
>        }
will look for a view named Login.cshtml (assuming razor) in the Views/{controllerName} folder.
>If you create the method in the controller then right-click in the method and choose 'Add View' it will create the view in the right place for you....

Thank you! I will follow your direction.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform