KDavie: i get what you write, but if i set it to 1 instead of the databinded value, it works. I can get the property value. that's why assume it's a databinding oriented problem.
jmeckley:
Yes, if i put <asp:label runat="server" text='DataBinder.Eval(Container.DataItem, "id" )' /> into the...
I think we're talking about two separate things.
In my example i have many controls, because my user control is inside the repeater's Itemtemplate, so one is created for every datarow.
And i try to access the Server attribute from INSIDE the user control.
And that works as mentioned in my...
OK, i get it.
Is it possible to retrieve the Server attribute from the web control's code?
Something like this (in control.ascx.cs and Page_Load)
ServerID = this.Attributes["Server"];
on the page, in the repester's itemtemplate when adding the control:
<FN:Checklist ID="Checklist1" runat="server" Server='<%#DataBinder.Eval(Container.DataItem, "id" )%>'></FN:Checklist>
Hello all
I"ve just run into this:
There's a simple page, what contains a repeater, that only has an itemtemplate with a web user control. like this:
<asp:Repeater runat="server" ID="rptrChecklist">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.