【问题标题】:I cannot update data via Jquery popup我无法通过 Jquery 弹出窗口更新数据
【发布时间】:2015-10-29 21:57:50
【问题描述】:

我有一个显示数据的网格视图,单击测试按钮时,会显示一个包含单击行数据的弹出窗口。当我更改文本框记录的值时,没有修改。这个问题怎么解决???

【问题讨论】:

标签: javascript c# jquery asp.net gridview


【解决方案1】:

浏览器只会发送具有name 属性的表单元素,所以我猜你的问题是你的文本框没有名字:

<asp:TextBox ID="txtAutor" name="txtAutor" runat="server"></asp:TextBox><br /> //Not familiar with asp, so I'm not sure if this is the correct way to set the name attr of the TextBox

【讨论】:

    【解决方案2】:

    您的代码:
    Id: &lt;asp:Label ID="lblId" runat="server" Text="Label"&gt;&lt;/asp:Label&gt;&lt;br /&gt;

    • 我认为你应该使用&lt;asp:TextBox ID="lblId" runat="server" name="id"&gt;&lt;/asp:TextBox&gt;

    Autor: <asp:TextBox ID="txtAutor" runat="server"></asp:TextBox><br /> Viti: <asp:TextBox ID="txtViti" runat="server"></asp:TextBox>

    • 这两个输入元素需要name属性才能在表单中传递值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-10-30
      • 1970-01-01
      • 1970-01-01
      • 2021-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多