如何在不使用Ajax的情况下从表中的ASPX页面上的代码访问Tekerik RadNumericTextBox中用户输入的值?我需要将它们保存到数据库中的一个表中,可能使用数据绑定?任何帮助或建议将不胜感激。
<telerik:RadPanelItem Enabled="false" Text="Step 4: Goals" runat="server">
<Items>
<telerik:RadPanelItem Value="Goals" runat="server">
<ItemTemplate>
<div class="formEntry-fb">
<ul id="goalInfo">
<li>
<asp:Repeater ID="rptGoals" runat="server">
<div style="float: left;">
<label class="textLabel right">Goals</label>
</div>
<div style="display: inline-block;">
<div class="RadListView RadListView_Silk ">
<headertemplate>
<table cellspacing="0" style="width: 100%;" border="0">
<thead>
<tr id="headerRow" runat="server" class="rlvHeader">
<th>Goal</th>
<th>Expected result
</th>
</tr>
</thead>
<tbody>
</headertemplate>
<itemtemplate>
<tr class="rlvI">
<td>
<asp:Label ID="lblGoal" CssClass="textLabel" runat="server" Text="Interactions"></asp:Label>
</td>
<td style="text-align: right;">
<telerik:RadNumericTextBox ID="txtInteractions" runat="server" MinValue="1" MaxValue="100000" NumberFormat-DecimalDigits="0" DataType="System.Int32" ShowSpinButtons="false" AutoPostBack="true" OnTextChanged="AttendeesChanged" Value="1"></telerik:RadNumericTextBox>
</td>
</tr>
<tr class="rlvI">
<td>
<asp:Label ID="lblAppointments" CssClass="textLabel" runat="server" Text="Appointments"></asp:Label>
</td>
<td style="text-align: right;">
<telerik:RadNumericTextBox ID="txtAppointments" runat="server" MinValue="1" MaxValue="100000" NumberFormat-DecimalDigits="0" DataType="System.Int32" ShowSpinButtons="false" AutoPostBack="true" OnTextChanged="AttendeesChanged" Value="1"></telerik:RadNumericTextBox>
</td>
</tr>
<tr class="rlvI">
<td>
<asp:Label ID="lblCustomersAssessment" CssClass="textLabel" runat="server" Text="Customer Needs Assessment"></asp:Label>
</td>
<td style="text-align: right;">
<telerik:RadNumericTextBox ID="txtCustomerAssessment" runat="server" MinValue="1" MaxValue="100000" NumberFormat-DecimalDigits="0" DataType="System.Int32" ShowSpinButtons="false" AutoPostBack="true" OnTextChanged="AttendeesChanged" Value="1"></telerik:RadNumericTextBox>
</td>
</tr>
<tr class="rlvI">
<td>
<asp:Label ID="lblCheckingAccount" CssClass="textLabel" runat="server" Text="Checking Accounts"></asp:Label>
</td>
<td style="text-align: right;">
<telerik:RadNumericTextBox ID="txtCheckingAccounts" runat="server" MinValue="1" MaxValue="100000" NumberFormat-DecimalDigits="0" DataType="System.Int32" ShowSpinButtons="false" AutoPostBack="true" OnTextChanged="AttendeesChanged" Value="1"></telerik:RadNumericTextBox>
</td>
</tr>
<tr class="rlvI">
<td>
<asp:Label ID="lblSolutions" CssClass="textLabel" runat="server" Text="Solutions"></asp:Label>
</td>
<td style="text-align: right;">
<telerik:RadNumericTextBox ID="txtSolutions" runat="server" MinValue="1" MaxValue="100000" NumberFormat-DecimalDigits="0" DataType="System.Int32" ShowSpinButtons="false" AutoPostBack="true" OnTextChanged="AttendeesChanged" Value="1"></telerik:RadNumericTextBox>
</td>
</tr>
</itemtemplate>
<footertemplate>
</tbody>
</table>
</footertemplate>
</asp:Repeater>
</div>
</div>
</li>
</ul>
</div>
答案 0 :(得分:0)
尝试这样做以获得&#39; txtInteractions&#39;值
//First .Value returns the nullable decimal or double
txtInteractions.Value
//second .Value gets the decimal or double in non-nullable form
txtInteractions.Value.Value