Aug 04, 2015, 9:31 PM
Cannot get Text from TextField
Please help, I have a simple example:
<ext:ResourceManager runat="server" />
<ext:Viewport runat="server">
<Items> <ext:TextField runat="server" ID="Txt1" FieldLabel="Insert"/>
<ext:TextArea runat="server" ID="Area1" FieldLabel="Text" />
<ext:Button runat="server" ID="Btn1" Text="Click" UI="Primary" OnDirectClick="Do"></ext:Button>
<ext:Button runat="server" ID="Button1" Text="Click" UI="Primary" OnDirectClick="getText"></ext:Button>
</Items>
</ext:Viewport>
and in code behind I have the following:protected void Do(object sender, EventArgs e)
{
string b = Txt1.Text.ToString();
string c = Area1.Text;
}
Nor string neither c save the value from the text field, how can I obtain it if it is entered by the user and after clicking the button ? Please help, I am desperate...
Last edited by geoffrey.mcgill; Aug 10, 2015 at 5:35 PM.