I want to thank you very much for all your time!! I am going to print this and then read before bed! :) I wound up doing a very extensive work-around wherein I tied in a directive (read that somewhere) at the page so that I can refer to MasterPage controls from within the contentpage. Then..on each pageload event, I have four navigating buttons that take me to four different pages (link to the site--where buttons are just images, as I am working on my development machine, is
www.kofc1913.org/sunsite.aspx )
So..basically, in each pageload, set up, it runs through a bunch of code.
Here's my MasterPage:
<body>
<form id="form1" runat="server" accept="4">
<div id='main'>
<div id='header' >
<img src="Site_Images/Sunbanner.jpg" />
</div>
<div id='aboutbutton'>
<asp:ImageButton ID="AboutButton" runat="server" ImageUrl="Site_Images/ctl00_aboutbuttonwhite.bmp" PostBackUrl="default.aspx" />
</div>
<div id='exhibitbutton'>
<asp:ImageButton ID="ShowsButton" runat="server" ImageUrl="Site_Images/ctl00_showsbuttonwhite.bmp" PostBackUrl="shows.aspx" />
</div>
<div id='awardsbutton'>
<asp:ImageButton ID="AwardsButton" runat="server" ImageUrl="Site_Images/ctl00_awardsbuttonwhite.bmp" PostBackUrl="awards.aspx" />
</div>
<div id='artbutton'>
<asp:ImageButton ID="SunsartButton" runat="server" ImageUrl="Site_Images/ctl00_sunsartbuttonwhite.bmp" PostBackUrl="artgallery.aspx" />
</div>
<div id='container'>
<asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id='footer'>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="Admin/addpictures.aspx">Login</asp:HyperLink>
<span style="margin-left:40px">Future Copyright Info</span>
</div>
</div>
</form>
</body>
Here's the javascript file:
function EvImageOverChange(name, direction)
{
switch(direction)
{
case 'in': name.src = 'Site_Images/' + name.id + 'Selecting.bmp';
break;
case 'out' : name.src = 'Site_Images/'+ name.id + 'white.bmp';
break;
case 'neither' : name.src = 'Site_Images/' + name.id + 'selected.bmp';
break;
}
}
Here's the Page Load for one of the four pages
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not IsPostBack) Then
Dim aboutButtonToFind As ImageButton
aboutButtonToFind = CType(Master.FindControl("AboutButton"), ImageButton)
Dim showsButtonToFind As ImageButton
showsButtonToFind = CType(Master.FindControl("ShowsButton"), ImageButton)
Dim awardsButtonToFind As ImageButton
awardsButtonToFind = CType(Master.FindControl("AwardsButton"), ImageButton)
Dim sunsartButtonToFind As ImageButton
sunsartButtonToFind = CType(Master.FindControl("SunsartButton"), ImageButton)
aboutButtonToFind.Attributes("OnMouseOver") = "javascript
:EvImageOverChange(this, 'in');"
aboutButtonToFind.Attributes("OnMouseOut") = "javascript
:EvImageOverChange(this, 'neither');"
showsButtonToFind.Attributes("OnMouseOver") = "javascript
:EvImageOverChange(this, 'in');"
showsButtonToFind.Attributes("OnMouseOut") = "javascript
:EvImageOverChange(this, 'out');"
awardsButtonToFind.Attributes("OnMouseOver") = "javascript
:EvImageOverChange(this, 'in');"
awardsButtonToFind.Attributes("OnMouseOut") = "javascript
:EvImageOverChange(this, 'out');"
sunsartButtonToFind.Attributes("OnMouseOver") = "javascript
:EvImageOverChange(this, 'in');"
sunsartButtonToFind.Attributes("OnMouseOut") = "javascript
:EvImageOverChange(this, 'out');"
aboutButtonToFind.ImageUrl = "Site_Images/ctl00_aboutbuttonselected.bmp"
End If
End Sub
So...for each page, I just change which button does what according to the page it is on.
VERY long code!!
Thanks for all your help--please forgive if I have a question about it in the morning!
Kind Regards,
Rob