Oct 13, 2012, 5:15 AM
Textfield value is not updated
Hi,
I am getting the value from SQL Db to the textfield...
Example : china....i updated to japan..in page_load it gets an updated value(japan)...but it gets the value as china in btnSave_Click method.....
I am getting the value from SQL Db to the textfield...
<ext:ComboBox ID="drpSecQues" runat="server" FieldLabel="Secret Question" Editable = "false" Width = "175" Cls="AlignLeft" AutoPostBack = "false" >
<Items>
<ext:ListItem Text="Select" />
<ext:ListItem Text="What is your pet name" />
<ext:ListItem Text="What is your favourite Place" />
<ext:ListItem Text="What is your favourite Game" />
<ext:ListItem Text="What is your favourite Food" />
<ext:ListItem Text="What is your favourite Colour" />
</Items>
<Listeners>
<Select Handler = "loadvalue();" />
</Listeners>
</ext:ComboBox>
<ext:TextField ID="txtSecAns" runat="server" FieldLabel="Secret Answer" EmptyText="Enter the Secret Answer"
AllowBlank="false" BlankText="Your Secret Answer is required." Width = "175" Cls="AlignLeft" />
Once i updated the textfield and When i am calling the save button in server side , it shows the old value:Example : china....i updated to japan..in page_load it gets an updated value(japan)...but it gets the value as china in btnSave_Click method.....
<buttons>
<ext:Button ID="btnSave" runat="server" Icon="Disk" Text="Submit" >
<DirectEvents>
<Click OnEvent = "btnSave_Click" />
</DirectEvents>
</ext:Button>
Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As DirectEventArgs) Handles btnSave.Click
If txtSecAns.Text = "" Then
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "3IMS", "alert('Enter the Secret Answer');", True)
End If
End Sub