Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

access inner formview controls

0 views
Skip to first unread message

Howard

unread,
Jul 31, 2006, 12:29:32 AM7/31/06
to
how do I access a textbox control inside a formview?
formview.textbox1.text == "hello world"; doesn't work


chris

unread,
Jul 31, 2006, 2:22:12 AM7/31/06
to
You have to use find control.

((TextBox)formview.FindControl("textbox1")).Text = "Hello world";

Howard

unread,
Jul 31, 2006, 6:54:29 AM7/31/06
to
I got this error
Unable to cast object of type
'System.Web.UI.HtmlControls.HtmlGenericControl' to type
'System.Web.UI.WebControls.TextBox'.


"chris" <ch...@cubed-c.com> wrote in message
news:1154326932.1...@m79g2000cwm.googlegroups.com...

Ray Booysen

unread,
Jul 31, 2006, 8:38:24 AM7/31/06
to
Is textbox1 a Textbox you placed on the web form?
0 new messages