A
Andrew
On our site, we display a list of links for user navigation. Since this
list is on many pages, I simply created an .ascx file called Menu, put the
links in there, and then add the Menu control to the .aspx pages we want the
links to show. Seemed to be a quick solution, very similar to SSI of the
old days.
Now I have run into a stumper -- and my level of .Net understanding being
very low isn't helping much. What I would like to accomplish is have one of
the links appear bolded and as normal text (not a link) depending on which
page is being viewed. That is, if the links are Page1 through Page5, and
the viewer hits Page4, I need to let the Menu control know to make Page4
appear bolded and just plain text.
My problem is I am unable to figure out how to do this. I believe I just
need to pass in something that tells the Menu what to do...and since
everything is a class, if I give the Menu control a publicly accessible
property, I should be able to set that. So, I tried creating a public
property in the Menu control's code behind page, but I can't seem to access
that property from any .aspx code behind page I place the Menu control into.
Is this not what I should do?
I have tried searching Google, I have scanned many postings in here, I found
an article over at 15Seconds (http://www.15seconds.com/issue/020430.htm) and
another on the MSDN
(http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-simulatinginclud
e.asp) but I just don't understand what I am reading, nor do I even know if
that is the direction I need to go. These are talking about Web User
Controls, and I don't know if this case warrants one of these.
I hope that there is someone out here who understands what I am trying to
do, and knows a relatively simple and easy method of accomplishing it.
Thanks
-- Andrew
list is on many pages, I simply created an .ascx file called Menu, put the
links in there, and then add the Menu control to the .aspx pages we want the
links to show. Seemed to be a quick solution, very similar to SSI of the
old days.
Now I have run into a stumper -- and my level of .Net understanding being
very low isn't helping much. What I would like to accomplish is have one of
the links appear bolded and as normal text (not a link) depending on which
page is being viewed. That is, if the links are Page1 through Page5, and
the viewer hits Page4, I need to let the Menu control know to make Page4
appear bolded and just plain text.
My problem is I am unable to figure out how to do this. I believe I just
need to pass in something that tells the Menu what to do...and since
everything is a class, if I give the Menu control a publicly accessible
property, I should be able to set that. So, I tried creating a public
property in the Menu control's code behind page, but I can't seem to access
that property from any .aspx code behind page I place the Menu control into.
Is this not what I should do?
I have tried searching Google, I have scanned many postings in here, I found
an article over at 15Seconds (http://www.15seconds.com/issue/020430.htm) and
another on the MSDN
(http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-simulatinginclud
e.asp) but I just don't understand what I am reading, nor do I even know if
that is the direction I need to go. These are talking about Web User
Controls, and I don't know if this case warrants one of these.
I hope that there is someone out here who understands what I am trying to
do, and knows a relatively simple and easy method of accomplishing it.
Thanks
-- Andrew