<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<tr>
<td class="TxtBox" align="left">
<asp:TextBox ID="Cont1" Columns="70" TextMode="MultiLine" CssClass="InputStyle" runat="server"></asp:TextBox>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
<asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" />当Button1 click 的时候,取出所有 TextBox 的值
<ItemTemplate>
<tr>
<td class="TxtBox" align="left">
<asp:TextBox ID="Cont1" Columns="70" TextMode="MultiLine" CssClass="InputStyle" runat="server"></asp:TextBox>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
<asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" />当Button1 click 的时候,取出所有 TextBox 的值
解决方案 »
- (100分在线等)权限问题吗?
- vs 2008 中 web用户控件问题
- ===========50分求网银支付功能(急!!!)========~~
- 客户端的Excel不可见,急!!!
- 与服务器的传输连接失败
- 请教各位大侠----我想在.net下,用owc做报表,该如何使用??急....在线等待
- windows 2008 注册dll,ocx提示:模组"XXX"已经载入,但呼叫DllRegisterServer失败,错误为0x80004005
- 调用存储过程出错,请有经验的老道给予解困
- 打开数据库的问题
- MVC + EF 是否还需要传统三层呢 (BLL DAL)
- 为什么我的网站在IE中字体忽大忽小
- gridview中模板列中放入label和radiobuttonlist的绑定问题
RepeaterItemCollection ric=re.Items;
ArrayList al = new ArrayList();
foreach (RepeaterItem ri in ric)
{
TextBox tb = ri.FindControl("Cont1") as TextBox;
//做些事件;
//比如说拼个数组
}
string textBoxValues="";
for (int i = 0; i < this.rpt.Items.Count; i++)
{
TextBox tB = (TextBox )this.Repeater1.Items[i].FindControl("Cont1");
if (tB.Text!=null)
{
textBoxValues +=tB.Text.Tostring();
}
}