日期:2014-05-17  浏览次数:20978 次

C# WEB里如何从数据库读入,再输出到textbox
this.txtBoxName.Text   =   thisReader[ "CustomerID "];
我这么写不对啊,哪个达人能帮帮我啊

------解决方案--------------------
txtBoxName应该是服务器端控件
如:
<asp:textbox id= "txtBoxName " runat= "server " TextMode= "MultiLine " MaxLength= "30 " Width= "224px " Rows= "5 " Columns= "60 "> </asp:textbox>

txtBoxName.Text = thisReader[ "CustomerID "].ToString();