Hi @Gary Globus ,
According to your description you want to achieve refresh ascx page. I think you can try the following two methods.
1.Use an AJAX UpdatePanel with a timer to automatically refresh data.
<asp:UpdatePanel runat="server" D="UpdatePanel1">
<ContentTemplate>
<asp:Timer runat="server" ID="clock" OnTick="clock_Tick" Interval="1000" Enabled="true"></asp:Timer>
<uc1:ProgressBar runat="server" ID="ProgressBar" />
</ContentTemplate>
<Triggers >
<asp:AsyncPostBackTrigger ControlID="clock" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
protected void clock_Tick(object sender, EventArgs e)
{
UpdatePanel1.Update();
}
2.If you're creating a user control that's being built based on data saved. What you can do is create a method that does that building and then call it within the page and user control:
UserControl:
protected Page_Load(object sender, EventArgs e)
{
BuildControlBasedOnData();
}
public BuildControlBasedOnData()
{
// Build the user control based on saved data
}
Calling Page:
Button_Click(object sender, EventArgs e)
{
UserControl1.BuildControlBasedOnData();
}
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.