私は以下のフォームビューを持っています。情報を表示できるようにしたいと思っています。もし誰かが変更を加えたら、update.Iをクリックしてこの情報を更新しなければなりません。私はfrm1がeditmodeを期待していると言って例外を残している。可能な場合は事前にFormviewでEditItemTemplateとItemTemplateを同時に使用する方法はありますか?
おかげ
<<asp:Formview D="FormView1" runat="server" DataSourceID="SqlDesc" ID="frm1">
<ItemTemplate>
<table>
<tr>
<td>
Description:<br />
</td>
<td style="">
<asp:TextBox ID="DescTbox" runat="server" Width="450px" TextMode="MultiLine" Text='<%# Bind("Description") %>' Enabled="True" Rows="4"></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update"> </asp:Button>
</td>
</tr>
</table>
</ItemTemplate>
<EditItemTemplate>
<table>
<tr>
<td>
Description:<br />
</td>
<td style="">
<asp:TextBox ID="DescTbox" runat="server" Width="450px" TextMode="MultiLine" Text='<%# Bind("Description") %>' Enabled="True" Rows="4"></asp:TextBox>
</td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update"> </asp:Button>
</td>
</tr>
</table>
</EditItemTemplate>
</asp:Formview>
申し訳ありませんが、あなたは、任意の例を与えることができますか? – CPM