Greybear
Technical User
- Aug 27, 2008
- 5
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:
The web control is simple:
Code behind the ascx:
My problem is the following:
on the page, the label shows the correct value. If i hardcode a value (like: server="1") into the user control, that's fine too. But if it's like above, the ServerID variable doesn't get any value.
What am i doing wrong? I've been googling my head off and i didn't get any closer.
I'm running .NET 3.5 under IIS7(Vista), working with VS2008
I'd appreciate any help
Thanks
Greybear
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:
Code:
<asp:Repeater runat="server" ID="rptrChecklist">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "id" )%>'></asp:Label>
<FN:Checklist ID="Checklist1" runat="server" Server='<%#DataBinder.Eval(Container.DataItem, "id" )%>'></FN:Checklist>
</ItemTemplate>
</asp:Repeater>
Code:
Parameter passed: <asp:Label runat="server" ID="Parameter"></asp:Label>
Code:
public partial class Serverchecklist : System.Web.UI.UserControl
{
public string ServerID;
public string Server
{
get
{
return ServerID;
}
set
{
ServerID = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
Parameter.Text = ServerID;
}
}
on the page, the label shows the correct value. If i hardcode a value (like: server="1") into the user control, that's fine too. But if it's like above, the ServerID variable doesn't get any value.
What am i doing wrong? I've been googling my head off and i didn't get any closer.
I'm running .NET 3.5 under IIS7(Vista), working with VS2008
I'd appreciate any help
Thanks
Greybear