我是一个新手在.net和即时尝试创建一个简单的网站。如何检索和显示数据从SQL到Aspx webform
我有这个文本框是多行,并已固定宽度和高度。
<asp:TextBox ID="TextBox1" runat="server" Height="168px" TextMode="MultiLine"
Width="303px"></asp:TextBox>
我也创建一个web.config连接到我的SQL数据库:
<connectionStrings>
<add name="TDBSConnectionString" connectionString="Data Source=local;Initial Catalog=IBSI;Persist Security Info=True;User ID=sa;Password=1"
providerName="System.Data.SqlClient" />
我怎样才能从我的数据库中检索数据并显示上述内容到文本框中。 我使用多行,因为数据不止一个。
你尝试过什么...... HTTP://mattgemmell.com/2008/12/08/what-有你试过/ – 2012-03-14 05:26:25