VWD aspx website question

Associate
Joined
9 Dec 2008
Posts
387
I'm trying out Visual Web Developer. I brought some pics to help explain what exactly I was doing (becuz VWD allows for so many different kinds of projects). I started a new aspx web page:

dialogl.jpg


VWD automtically adds a pretty Tabbed default layout and with other automatically generated pages ready to be filled out:

webpageka.jpg


So as you can see there are Tabs by default for the Home page and the About page. Then I decided to add a NEW aspx page to the project and then discovered that there is NO file (like a "Layout" file) amongst the project files that defines the Tab menu and it's contents.

filesr.jpg


What's going on? Earlier on I tried out starting a new razor cshtml web page. With that one there WAS a "sitelayout" file in which you can declare the contents of the Tabs menu. Why is there NO layout file with the aspx project? With that one there is no way that I can find to edit/add-to the Tabs.

Thanks
 
Last edited:
SORRY guys. I finally found it right after posting (even tho I've been scratching my head for an hour). There is something magical about posting a question about something which magically causes the answer to fall in your lap.

When I was looking at the Site.master file, by accident I kept looking only at the "Site.master.cs" file. I KNOW that, that is a separate code file for the Site.master file. All the web page files have a separate code file like that. BUT with the Site.master file I kept accidently ONLY looking at the cs file. For some reason I never clicked on the Site.master file itself.

ANYWAY that file contains the Tab menu definitions. DOH! :o
 
The layout will be defined by your masterpage (site.master) in your pictures.

If you look at the html of the about.aspx and default.aspx pages you will see a section at the top that says masterpagefile="site.master" this defines that when the page is called that the master page assocaited is loaded and then anything contained in the contentplaceholder is then placed on the page.

If that doesn't make sense then I would suggest going to asp.net and look at some of the tutorial videos.

No the razor project uses a different design methodology/pattern called MVC (Model-View-Controller) where as your project above is using web forms.

I would suggest reading this to understand the differences between MVC vs Web Forms

http://www.asp.net/mvc/tutorials/older-versions/overview/asp-net-mvc-overview

Hope this helps in answering your questions.
 
The layout will be defined by your masterpage (site.master) in your pictures.

If you look at the html of the about.aspx and default.aspx pages you will see a section at the top that says masterpagefile="site.master" this defines that when the page is called that the master page assocaited is loaded and then anything contained in the contentplaceholder is then placed on the page.

If that doesn't make sense then I would suggest going to asp.net and look at some of the tutorial videos.

No the razor project uses a different design methodology/pattern called MVC (Model-View-Controller) where as your project above is using web forms.

I would suggest reading this to understand the differences between MVC vs Web Forms

http://www.asp.net/mvc/tutorials/older-versions/overview/asp-net-mvc-overview

Hope this helps in answering your questions.
Thanks for reply. Yeah read my previous reply-to-myself. I saw the asp object declarations (which render the Tabs) and the reference to the master file, but everytime I looked at the master file for some reason I always accidently went straight down to it's accompanying CS file instead of the master file itself. So I thought that the master CS file was some sort of "default CS" file for like "content pages that share the same start up code" or something. I simply wasn't aware of the non-CS master file itself. I simply by accident never clicked on it always clicking on it's CS file. Just a total DOH moment :o
 
Back
Top Bottom