我几天坚持这个问题,希望得到一些建议...... 最近我一直在做学校作业,并且需要将Gridview中的数据放入模态对话框中进行编辑,我尝试了几种方法,它仍然无法工作..
Asp.net(前):
<Columns>
<asp:BoundField DataField="ProductID" HeaderText="ProductID" InsertVisible="False" ReadOnly="True" SortExpression="ProductID" />
<asp:BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="ProductLabel" HeaderText="ProductLabel" SortExpression="ProductLabel" />
<asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" SortExpression="UnitPrice" />
<asp:BoundField DataField="CategoryID" HeaderText="CategoryID" SortExpression="CategoryID" />
<asp:BoundField DataField="QuantityStock" HeaderText="QuantityStock" SortExpression="QuantityStock" />
<asp:BoundField DataField="DateCreated" HeaderText="DateCreated" SortExpression="DateCreated" />
<asp:BoundField DataField="DateModified" HeaderText="DateModified" SortExpression="DateModified" />
<asp:BoundField DataField="QuantitySold" HeaderText="QuantitySold" SortExpression="QuantitySold" />
<asp:TemplateField ShowHeader="False">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
P / S:我试图设置我的模态对话框textbox.text,其中包含后面代码中调用的数据,但仍无法正常工作。