T
Tarun Mistry
Hi all, is it possible to update a usercontrol before it is rendered?
In my scenario I have a Page with a usercontrol on it. When a button is
clicked on the Page, I want to update the usercontrol, more specifically
making a placeholder become visible. However it wont work. Im confused. I
catch the button click even on the page and within this i run a method on my
usercontrol, however it doesnt seem to work. Few code lines given below.
Please help! Thank you!
In my PageI have something like this:
private void ButtonPatientSearch_Click(object sender, System.EventArgs e)
{
// construct dynamic search results
MyUserControl.ShowResults(ArrayListofObjects);
}
and in the user conrtol I have the method to catch this request
public void ShowResults(ArrayList ArrayListofObjects)
{
MyPlaceHolder.Visible = true;
Repeater1.DataSource = ArrayListofObjects;
Repeater1.DataBind();
}
In my scenario I have a Page with a usercontrol on it. When a button is
clicked on the Page, I want to update the usercontrol, more specifically
making a placeholder become visible. However it wont work. Im confused. I
catch the button click even on the page and within this i run a method on my
usercontrol, however it doesnt seem to work. Few code lines given below.
Please help! Thank you!
In my PageI have something like this:
private void ButtonPatientSearch_Click(object sender, System.EventArgs e)
{
// construct dynamic search results
MyUserControl.ShowResults(ArrayListofObjects);
}
and in the user conrtol I have the method to catch this request
public void ShowResults(ArrayList ArrayListofObjects)
{
MyPlaceHolder.Visible = true;
Repeater1.DataSource = ArrayListofObjects;
Repeater1.DataBind();
}