How to add datalist, hyperlink controls inside a Repeater and set the datasource for these
Posted on 2004-09-23
I have a repeater that holds the data from the G_Term table using a session variable.
What I would also like to do is add a hyperlink, and a datalist control inside this repeater and set the datasource properties of these two controls.
From my limited knowledge, I understand that I can use FindControl method to find the child control within the repeater and set their datasource properties.
But I do know enough to do these.
I need guidance on these.
Here is the scenario:
The repeater gets the following values form G_Term (using GT_ID from a session variable)
Example use: GT_Example
Now on top of these info, I would like to include a hyperlink (within the repeater) that will redirect the user to the Category page (I get the Category name from another passed sesssion variable)
And on bottom of these info, I would like to include a datalist control within this repeater,
that will show the related G_Term from another table, G_Related_Terms, and another hyperlink control to redirect the user to another page (Bibliography page) to get bibliographic info for this G_Term.
I need guidance on how I can use the FindControl method to find the child controls within this repeater and set their datasource properties.