I’m writing a Repeater Control in an ascx file which renders some info as a row that comes from a complex search. In an aspx file I have the query to retrieve a DataView that gives me the XML string with the info needed to feed the Repeater. The problem is that I don’t know how can I pass the XML string (or the DataView or DataSet) from the aspx to the ascx file so as I can render the info.
Thank you.
You need to expose a property or a method on the User Control so that the page referencing the
ASCXcontrol can receive the XML and do something with it (bind it to your repeater).You can perfectly create a method inside your ASCX control like this:
As a property…
The aspx page can call the method like so:
Or the property: