I have a page with a label (label1) in a formview( FormView1) and a label (label2) in a gridview(MyGridView).
The gridview label gets its value from the formview ( see code below) on the page_load event.
everything works fine on page_load except the gridview label shows the previous page's value. How do I ensure the formview is updated first and the gridview then reads the updated formview label?
I'm afraid your suggested change returns the error 'System.Web.UI.Control' does not contain a definition for 'Text' on the changed line of code ...any more thoughts on how I can get around this? Thanks!
protected void Page_Load(object sender, EventArgs e)
{
FormViewRow row = FormView1.Row
Label formlbl = (Label)row.FindControl("la
GridViewRow grdrow = MyGridView.HeaderRow;
(Label)grdrow.FindControl(
}