I have a aspx page name MakeRedemption.aspx, in which have a UserControl (Search.ascx).
There is Page_Prerender() in the MakeRedemption.aspx.
I would like to ask, how can I call the Page_Prerender() from MakeRedemption.aspx, by a function in Search.ascx.
It is something as follow :
Actually there is a looping in one of the function in my User Control page.
The Page_Prerender (MakeRedemption.aspx) will trigger after all the loop finish.
What I want is :
Everytime before end of each itme of the loop, I will like to trigger the Page_Prerender on the MakeRedemption.aspx to do something.
Something like :
for (int i = 0 ; i < 10 ; i ++)
{
//some code here
// I would like to trigger Page_Prerender here to do something before end of the loop.
} // the Page_Prerender (in MakeRedemption.aspx) trigger after all the loop finish.
Means that, this for loop has i = 10, thus, I would like to trigger the Page_Prerender 10 times inside the for loop.
My PreRender function in the aspx file is as follow :
protected void Page_Prerender(object sender, EventArgs e)
{
//some code here
}
Not sure this Page_Prerender() is consider as the auto generate OnPreRender() or not.
I would like to trigger this Page_Prerender() instead of OnPreRender() .
Sorry if I am asking a stupid question, I am new in programming and c#.
Kindly advise.
Thanks.