hi, i have a detailsview data control connected to a datasource. i converted all the bound fields to item templates and they have all been converted to textboxes. i need to compare values entered in one textbox and output the value in the other. I have attached a snippet of the code below. but its not working. pLease help.
<asp:DetailsView ID="DetailsView2" runat="server" AllowPaging="True" AutoGenerateRows="False"
DataKeyNames="ID" DataSourceID="SqlDataSource1" Height="113px" Style="margin-right: 237px"
Width="614px" DefaultMode="Insert" CellSpacing="3" GridLines="Vertical">
<Fields>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" />
<asp:TemplateField HeaderText="Warranty" SortExpression="Warranty">
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Warranty") %>'></asp:TextBox>
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Warranty") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Warranty") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Warranty Score" SortExpression="Warranty Score">
<EditItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("WarrantyScore") %>'></asp:TextBox>
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("WarrantyScore") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("WarrantyScore") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Fields>
</asp:DetailsView>
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If Textbox3.Text.ToString = "Yes" Then
Textbox4.Text = "1"
Else
Textbox4.Text = "2"
End If
End Sub