Mr_Shaw
asked on
FormView update a Label in PagerTemplate
I would like to update the value of a Label in the FormView PagerTemplate.
I have tried doing the following but it does not wok.
FormView1.FindControl("Lab el_RecordT otal") = FormView1.PageCount.ToStri ng();
Can anybody help?
I have tried doing the following but it does not wok.
FormView1.FindControl("Lab
Can anybody help?
ASKER
the code does not recognise that there is a label in FormView1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Do I add this into the formview preRender of the label preRender. Or should it gointo the formview DataBound
ASKER
The answer is the code goes into the Label PreRender.
Thanks for the help
Thanks for the help
ASKER
thanks
DataBound should do ...
Although I think the PageCount will be available in Page_Load and PreRender (but if using AJAX might throw some exception)
Although I think the PageCount will be available in Page_Load and PreRender (but if using AJAX might throw some exception)
Label lbl= (Label) FormView1.FindControl("RLa
if(lbl!=null)
{
lbl.Text = FormView1.PageCount.ToStri
}