I have created a RadlistView with the an InsertItemTemplate but when the Insert is carried out the values in the textboxes do not insert into the database. the insert process seems to be working, its just not taking the values from the textboxes.
The delete and edit templates are working great, its just the insert that doesn't seem to work. Would there be any reason for this?
Here is the insert code:
The delete and edit templates are working great, its just the insert that doesn't seem to work. Would there be any reason for this?
Here is the insert code:
<telerik:RadListView ID="radListView1" DataSourceID="sqlDataSource1" runat="server" |
ItemPlaceholderID="Container" DataKeyNames="ID" AllowPaging="true" |
OnItemCommand="RadListView1_ItemCommand"> |
<InsertItemTemplate> |
<fieldset style="float: left; width: 370px; height: 200px;"> |
<legend>Name:<asp:TextBox ID="txtBoxName" runat="server" /></legend> |
<table cellpadding="0" cellspacing="0" style="width: 370px;"> |
<tr> |
<td> |
<table cellpadding="0" cellspacing="5"> |
<tr> |
<td style="width: 25%">type:</td> |
<td style="width: 75%"> |
<asp:TextBox ID="txtBoxType" runat="server" /> |
</td> |
</tr> |
<tr> |
<td></td> |
<td> |
<asp:TextBox runat="server" ID="txtBoxTitle"></asp:TextBox> |
</td> |
</tr> |
</table> |
</td> |
<td align="right" style="width: 25%; padding-left: 10px;"></td> |
</tr> |
<tr> |
<td colspan="2"> |
<div style="float: left; width: 160px;"> |
<asp:Button ID="btnPerformInsert" runat="server" Text="Insert" CommandName="PerformInsert"/> |
<asp:Button ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" /> |
</div> |
</td> |
</tr> |
</table> |
</fieldset> |
</InsertItemTemplate> |
<asp:SqlDataSource ID="sqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" |
InsertCommand="INSERT INTO Names (name, type, title) VALUES (@name, @type, @title)"> |
<InsertParameters> |
<asp:Parameter Name="name" Type="String" /> |
<asp:Parameter Name="type" Type="String" /> |
<asp:Parameter Name="title" Type="String" /> |
</InsertParameters> |