Сетка для вставки в ASP - PullRequest
0 голосов
/ 30 мая 2011

Я хочу добавить сетку в ASP, используя только Insert Commend, не хочу работать с select delete и другими командами, я вставил другую Grid, но там она показывает другие данные и есть ли сетка, которую я могу использоватьтолько для вставки, а также хотите вставить несколько строк

<asp:FormView ID="FormView1" runat="server" DataKeyNames="Card_code" 
            DataSourceID="SqlDataSource1">
            <EditItemTemplate>
                Card_code:
                <asp:Label ID="Card_codeLabel1" runat="server" 
                    Text='<%# Eval("Card_code") %>' />
                <br />
                Description:
                <asp:TextBox ID="DescriptionTextBox" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Update" />
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </EditItemTemplate>
            <InsertItemTemplate>
                Card_code:
                <asp:TextBox ID="Card_codeTextBox" runat="server" 
                    Text='<%# Bind("Card_code") %>' />
                <br />
                Description:
                <asp:TextBox ID="DescriptionTextBox" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insert" />
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancel" />
            </InsertItemTemplate>
            <ItemTemplate>
                Card_code:
                <asp:Label ID="Card_codeLabel" runat="server" Text='<%# Eval("Card_code") %>' />
                <br />
                Description:
                <asp:Label ID="DescriptionLabel" runat="server" 
                    Text='<%# Bind("Description") %>' />
                <br />
                <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                    CommandName="Edit" Text="Edit" />
                &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                    CommandName="Delete" Text="Delete" />
                &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                    CommandName="New" Text="New" />
            </ItemTemplate>
        </asp:FormView>

вот код в этом коде. Я хочу только команду вставки, не хочу выполнять другие операции

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...