B
Brett
Preface: I am a complete neophyte to ASP.NET development. Unfortunately
the same holds true with respect to ASP development. I do consider myself
advanced as far as OOP development with the .NET Framework goes.
My question: I want to create a UserControl that will become part of a page
template to keep my site consistent. This particular control is to be a
sidebar menu that displays links to the various sections on my site. So far
it looks like the best route is to design the usercontrol with a multi-row
table that houses links to the other sections in each row. My question, I
guess, is:
Should I
a.) use a System.Web.UI.WebControls.Table and programmatically add the
'link' controls to the rows, or
b.) should I create a plain HTML (not server) table on the UserControl and
add the hyperlinks (via the designer) to each row.
If b.) then should the links be ASP.NET server controls or should I do HTML
controls there as well.
The plot thickens a bit because I want client script to execute when the
user mouses over the links (to highlight them). I understand if I use
server side controls then I have to emit the JavaScript code when the page
loads. This seems like a headache (not to mention a processing burden at
each page load for something that will never change.) However I am having a
lot of trouble trying to add HTML controls and coding the javascript into
the HTML portion of the .ascx. I get an "<id> is undefined" error when the
javascript event executes, which really amazes me since the IDE recognizes
it when I am adding the javascript to the HTML code.
Apparently I can't even figure out the proper way to phrase the question
since I'm not finding a lot of help when I search the net. I hoping you
guys will do a better job knowing what I mean (rather than what I say) than
the search engines do.
Thanks in advance,
Brett
the same holds true with respect to ASP development. I do consider myself
advanced as far as OOP development with the .NET Framework goes.
My question: I want to create a UserControl that will become part of a page
template to keep my site consistent. This particular control is to be a
sidebar menu that displays links to the various sections on my site. So far
it looks like the best route is to design the usercontrol with a multi-row
table that houses links to the other sections in each row. My question, I
guess, is:
Should I
a.) use a System.Web.UI.WebControls.Table and programmatically add the
'link' controls to the rows, or
b.) should I create a plain HTML (not server) table on the UserControl and
add the hyperlinks (via the designer) to each row.
If b.) then should the links be ASP.NET server controls or should I do HTML
controls there as well.
The plot thickens a bit because I want client script to execute when the
user mouses over the links (to highlight them). I understand if I use
server side controls then I have to emit the JavaScript code when the page
loads. This seems like a headache (not to mention a processing burden at
each page load for something that will never change.) However I am having a
lot of trouble trying to add HTML controls and coding the javascript into
the HTML portion of the .ascx. I get an "<id> is undefined" error when the
javascript event executes, which really amazes me since the IDE recognizes
it when I am adding the javascript to the HTML code.
Apparently I can't even figure out the proper way to phrase the question
since I'm not finding a lot of help when I search the net. I hoping you
guys will do a better job knowing what I mean (rather than what I say) than
the search engines do.
Thanks in advance,
Brett