publicity event fire
In Usercontrol
Declare this:
public event EventHandler FileUploaded;
In some of click event of usercontrol
// Fire public event.
FileUploaded(this.FileResourceId, e);
On .aspx page
On the page load
writes instance to know usercontrol first:
WRVS.Website.V1.WebApplication.Admin.inc.usercontrols.FileUploader uFileUploader =
(WRVS.Website.V1.WebApplication.Admin.inc.usercontrols.FileUploader)
fvContentPage.FindControl("uFileUploader");
if (uFileUploader != null)
{
uFileUploader.FileUploaded += new EventHandler(FileUploaded);
}
Then create event:
private void FileUploaded(object sender, EventArgs e)
{
// logic for page update.
}
No comments:
Post a Comment