home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Experience with Master Pages anyone?

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1682
Discussions: 200,958, Posts: 2,379,515, Members: 246,328
Old April 7th, 2007, 11:14 AM   Digg it!   #1 (permalink)
Mobile Member
 
ShuckyD's Avatar
 
Join Date: Apr 2005
Location: S. Central PA
Posts: 3,601
Experience with Master Pages anyone?

Back again with another Web Dev question... i really should learn more of this stuff, and with Visual Studio 2005 it shouldnt be that hard and i should learn it better.

Anyway many of you may recall the site that ive been working on for a club. www.propbustersrc.org Thats the site, and i uploaded most of the changes i have so far, i played around with a couple web photo galleries and the stuff. Unfortunately i never did that page completely right in the first place, meaning i used Dreamweaver and did a .ASP page but then i used 3 iframes to call the header, nav, and main window area. The thing that sucks about iframes are that you have to give them a set (px) height.... so they really arent a good choice there.

I never knew i could (didnt really think of it) design the whole page with ASP.NET (.aspx using C#) inside Visual Studio 2005 Pro, since i have it I should probably use it. I created a new site, read up on doing includes and realized they left them for Master Pages, so i found a tutorial on how to do them, it walked me through alot of stuff and i was utterly lost. But i still cant get the Master Page to do what i want, where I can call other pages, etc... Heres the link to the tutorial i was following: http://www.asp.net/learn/dataaccess/....aspx?tabid=63

Below you will see the .zip file of what ive worked with it so far, but still havent got it working right, all i want is to know how to get the Master Page made and have the navigation work much like the above mentioned site I worked on. Are there any samples i could take the master page from and change some directories, etc..?

Any help/suggestions/comments would be greatly appreciated... TIA

__________________
Thinkpad T61 14.1" wide | WinXP Pro | C2D T8300 CPU | 3GB DDR2 | 160GB HDD | AGN & WWAN
Lenovo S10 10.2" LED display | 1.6Ghz Atom CPU | 1GB DDR2 | 1.3mp webcam | B/G WiFi | 160GB HDD

Last edited by ShuckyD : April 7th, 2007 at 12:58 PM.
ShuckyD is offline   Reply With Quote
Old April 7th, 2007, 10:55 PM     #2 (permalink)
Banned
 
Iturea's Avatar
 
Join Date: Jan 2004
Location: Earth
Posts: 420
Talking

Just put the navigation in the Master page and all the child pages will inherit the Master. When you make a new page in VS just select the Master page. Its really that easy!
Iturea is offline   Reply With Quote
Old April 8th, 2007, 12:56 AM     #3 (permalink)
Mobile Member
 
ShuckyD's Avatar
 
Join Date: Apr 2005
Location: S. Central PA
Posts: 3,601
alright, i somewhat understand that, but still how will i be able to get a header thats always a constant file and then a main window area as well as a navigation area, either a file i made, or like with the .zip files i attached, something i created with VS's navigation (menu)
ShuckyD is offline   Reply With Quote
Old April 9th, 2007, 11:20 AM     #4 (permalink)
Banned
 
Iturea's Avatar
 
Join Date: Jan 2004
Location: Earth
Posts: 420
Here is an example Master Page

Code:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Default.master.cs" Inherits="Masters_Home" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">  
  <title>My Master Page</title>
  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
  <link rel="shortcut icon" type="image/ico" href="../favicon.ico" />
  <link href="../Style/default.css" rel="stylesheet" type="text/css" />
 
  <script language="JScript" type="text/jscript" src="JScripts/myscript.js" xml:space="preserve">
    //<![CDATA[
    //]]>
  </script>
 
</head>  
<body id="BodyStyle">
  <form id="form1" runat="server">
  <div class="MyNavigation"><a href="">Links 1</a> | <a href="">Link 2</a></div>
    <div class="PageContainer">
      <asp:ContentPlaceHolder ID="MainContent" runat="server">
      </asp:ContentPlaceHolder>
    </div>
  </form>
</body>
</html>
The above will get inherited by all child pages who choose this Master. You could put your navigation under the form tag between div tags.
Iturea is offline   Reply With Quote
Old April 9th, 2007, 11:28 AM     #5 (permalink)
Mobile Member
 
ShuckyD's Avatar
 
Join Date: Apr 2005
Location: S. Central PA
Posts: 3,601
ok.. now what i currently havent isnt that impressive looking and i cant seem to get it to look like a 3-page split.. meaning the top all the way across as a header, and like a 20% left area for the nav (or fixed pixel width) and then the other for the main area, what i have now, quite frankly looks a little special
ShuckyD is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Maxtor Experience orkboss Storage Related 4 November 12th, 2005 06:05 PM
anyone with TV repair experience? PSU2Fan IMO Community 2 September 23rd, 2003 07:04 PM
RAID 0 master/slave to master/master will67310 Technical Support 2 November 23rd, 2002 12:46 AM
Primary master, secondary master, help Kaizer Technical Support 6 September 12th, 2002 03:36 PM
First O/C experience :( KraM Processors, Memory, and Overclocking 19 August 6th, 2002 12:34 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2960)
The disrespect of Obama by Russian .. (41)
Making Health Care Worse (178)
Wireless Televisions. (12)
CPU fan stops spinning randomly (9)
Regular Build (11)
windows 7 problem (7)
Laptop with wireless problem. (5)
windows vista security holes (12)
Is the PSU I received dead? (12)
Print spooler problem (15)
radeon x850xt platinum & shader.. (6)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
Recent Discussions
windows vista security holes (12)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
Open With ..... Win7 (1)
webcam (0)
upgrade for hp a6101 (0)
Laptop with wireless problem. (5)
Modern Warfare 2: Who Bought It? (64)
tv not turn on-makes clicking sound (2)
CPU fan stops spinning randomly (9)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Virus advise (8)
My monitor won't turn on after instal.. (1)
Internet Lost (3)
Dept. of HS: NSA 'Helped' Develop Vis.. (16)
Point and Shoot Camera Suggestions. (4)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Hp Artist Edition + Matching Bag (0)


All times are GMT -4. The time now is 08:45 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28