H Howard Jul 31, 2006 #1 how do I access a textbox control inside a formview? formview.textbox1.text == "hello world"; doesn't work
how do I access a textbox control inside a formview? formview.textbox1.text == "hello world"; doesn't work
C chris Jul 31, 2006 #2 You have to use find control. ((TextBox)formview.FindControl("textbox1")).Text = "Hello world";
H Howard Jul 31, 2006 #3 I got this error Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.TextBox'.
I got this error Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.TextBox'.
R Ray Booysen Jul 31, 2006 #4 Howard said: I got this error Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.TextBox'. Click to expand... Is textbox1 a Textbox you placed on the web form?
Howard said: I got this error Unable to cast object of type 'System.Web.UI.HtmlControls.HtmlGenericControl' to type 'System.Web.UI.WebControls.TextBox'. Click to expand... Is textbox1 a Textbox you placed on the web form?