【发布时间】:2013-02-26 18:07:39
【问题描述】:
我在 ascx 文件中的 FormView 中有一个 asp: 文本框,如下所示>
<asp:FormView runat="server" ID="myFrmView">
<asp:TextBox runat="server" ID="txtBox1" size="20" MaxLength="150" >
</FormView>
但在代码隐藏 ascx.cs 文件中,我无法从文本框中检索值
string name2 = Request.Form["txtBox1"];
如何获取价值?
【问题讨论】:
-
这将根据发布的另一个甜蜜技巧
string name2 = Request.Form[txtBox1.UniqueID];从服务器端获取它 -
Chris_45 我建议编辑你的问题..你在这里留下了很多困惑......