이상한 문제가 발생했습니다. 내가 TextBox
값을 얻으려고TextMode로 포스트 백한 후 TextBox 값이 손실됩니다.
<asp:ScriptManager runat="server" />
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:TextBox ID="amountTextBox" runat="server" TextMode="Number" />
<asp:Button runat="server" Text="Confirm" OnClick="confirmButton_Click" />
</ContentTemplate>
</asp:UpdatePanel>
클릭 Button
후 : 나는 TextBox
와 함께 간단한 페이지가
public partial class test : Page {
protected void confirmButton_Click(object sender, EventArgs e) {
var answer = amountTextBox.Text;
}
}
을하지만 빈입니다. UpdatePanel
을 삭제하면 값을 얻을 수 있습니다. UpdatePanel
을두고 TextMode
속성을 제거하면 값을 얻을 수 있습니다. 하지만 이 Number
으로 설정된 TextBoxt
을 가지고 있지 않은 이유는 UpdatePanel
입니다.