I 'm struggling with this for a while now and no matter what I do I
cannot get it to work.
Here's more or less what 's going on:
I'm creating Datagrids at runtime, and they contain a templatecolumn,
which I load from a webusercontrol; e.g.
....
Dim temp As ITemplate = Page.LoadTemplate("webusercontrol1.ascx")
dim tc as new TemplateColumn
tc.HeaderText = "bogus"
tc.ItemTemplate = temp
dgResults.Columns.Add(tc)
....
In the webusercontrol1.ascx I have (a.o.) the following:
<%#GetDetails(DataBinder.Eval(CType(Container, DataGridItem).DataItem,
"ID")%>
which is a function that uses a value from the dataset (and returns
temp)
Now I would actually want to change this function to include another
var that is defined earlier on the page (main page, not ascx), for ex.
<%#GetDetails((DataBinder.Eval(CType(Container,
DataGridItem).DataItem, "ID"), my2ndvar)%>
but i can't find a way to pass that info on. Even if i put it in a
session var, it isn't there when the ascx fires (?), why ? .
Can somebody please provide some help,
TIA !