S
Steve Gadlin
Hi there! First off, let me apologize for the basic
question... I'm very new to .NET programming.
I'm building a web site using VB.NET, and am trying to
include several custom user controls. One of these user
controls handles the navigation.
This user control polls the database for the section
headers that the current user has access to. It grabs
those headers from the database, let's say 5 of them, then
proceeds to print them to the screen.
After each header, a second user control is embedded.
This user control polls the database again for all of the
individual pages under that section header the user has
access to... and then prints those to the screen one at a
time.
I've built the components, and they seem to work just
fine. My problem lies in embedding one component within
the other, and dynamically assigning one of its properties.
Here's what I'd LIKE to do:
<intranet:links runat="server" ID="myLinks" header="4" />
Where it says header="4", I'd like that 4 to be a dynamic
number. This line of code appears within a repeater, that
is bound to a dataset.
I've tried the following:
intranet:links runat="server" ID="myLinks" header="<%#
DataBinder.Eval(Container.DataItem, "ID") %>" />
But that gives me errors. What's the proper way to pass
that ID to the user control as its header property?
If you've read this far, thank you... I'm guessing that
I'm misunderstanding something VERY basic here. This
would have been simple for me to do using old school ASP,
but the .NET has got me flummoxed.
Thanks for your help!!!!!
Please email (e-mail address removed) with your responses.
Thanks,
Steve Gadlin
question... I'm very new to .NET programming.
I'm building a web site using VB.NET, and am trying to
include several custom user controls. One of these user
controls handles the navigation.
This user control polls the database for the section
headers that the current user has access to. It grabs
those headers from the database, let's say 5 of them, then
proceeds to print them to the screen.
After each header, a second user control is embedded.
This user control polls the database again for all of the
individual pages under that section header the user has
access to... and then prints those to the screen one at a
time.
I've built the components, and they seem to work just
fine. My problem lies in embedding one component within
the other, and dynamically assigning one of its properties.
Here's what I'd LIKE to do:
<intranet:links runat="server" ID="myLinks" header="4" />
Where it says header="4", I'd like that 4 to be a dynamic
number. This line of code appears within a repeater, that
is bound to a dataset.
I've tried the following:
intranet:links runat="server" ID="myLinks" header="<%#
DataBinder.Eval(Container.DataItem, "ID") %>" />
But that gives me errors. What's the proper way to pass
that ID to the user control as its header property?
If you've read this far, thank you... I'm guessing that
I'm misunderstanding something VERY basic here. This
would have been simple for me to do using old school ASP,
but the .NET has got me flummoxed.
Thanks for your help!!!!!
Please email (e-mail address removed) with your responses.
Thanks,
Steve Gadlin