P
postings
Hi
I'm trying to set the focus to a textbox situated in the footer of a
gridview, when the page is loading. (note textbox is in a template).
So far I've got:
-------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Page.SetFocus(gvPortfolio.FooterRow.FindControl("txtName"))
End Sub
-------------------------------
Unfortunately this comes up with yellow screen of death:
"System.InvalidOperationException: The DefaultButton of 'form1' must be
the ID of a control of type IButtonControl."
Any ideas?
Thanks
Alex
I'm trying to set the focus to a textbox situated in the footer of a
gridview, when the page is loading. (note textbox is in a template).
So far I've got:
-------------------------------
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Page.SetFocus(gvPortfolio.FooterRow.FindControl("txtName"))
End Sub
-------------------------------
Unfortunately this comes up with yellow screen of death:
"System.InvalidOperationException: The DefaultButton of 'form1' must be
the ID of a control of type IButtonControl."
Any ideas?
Thanks
Alex