[CLOSED] Text value of TextField object

  1. #1

    [CLOSED] Text value of TextField object

    Hi,

    I have a problem very very strange...

    I need to read the Text value of TextField Object and show it in the Message Box.

    WebForm1.aspx
    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="B2B.WEB.WebForm1" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    </head>
    <body>
    
        <ext:ResourceManager runat="server" />
    
        <ext:Panel ID="PanelTest" runat="server" Width="500" Border="true">
            <Items>
                <ext:TextField ID="TextFieldCode" runat="server" FieldLabel="Code:" />
            </Items>
            <Buttons>
                <ext:Button ID="ButtonOK" runat="server" Text="OK" Icon="Accept">
                    <DirectEvents>
                        <Click OnEvent ="ButtonOK_Click" />
                    </DirectEvents>                    
                </ext:Button>
            </Buttons>
        </ext:Panel>
    
    </body>
    </html>
    WebForm1.aspx.vb
    Public Class WebForm1
        Inherits System.Web.UI.Page
    
        Protected Sub ButtonOK_Click(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs)
            Dim Code As String = TextFieldCode.Text
            Ext.Net.X.Msg.Show(New Ext.Net.MessageBoxConfig With {.Icon = Ext.Net.MessageBox.Icon.WARNING, .Title = "", .Message = Code, .Buttons = Ext.Net.MessageBox.Button.OK})
        End Sub
    
    End Class
    If I cilck on the button appear a empty MessageBOX....
    The Text Value is blank !!

    Am I forgetting something?

    Tnx
    Last edited by Daniil; Nov 14, 2014 at 4:36 AM. Reason: [CLOSED]
  2. #2
    You are missing a <form runat="server">.

    Because you have no <form> on your page, no fields are submitted.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Thanks geoffrey.mcgill...

    It's work!

    It 'really got the time to go to sleep ...
    I'm working more than 12 hours :(

Similar Threads

  1. [CLOSED] Retrieve Object TextField
    By mapperez in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 11, 2014, 5:23 PM
  2. [CLOSED] TextField Binding with sub object
    By jdacosta in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 13, 2013, 10:25 PM
  3. Replies: 5
    Last Post: Aug 16, 2013, 2:40 PM
  4. [CLOSED] Wrap text in textfield
    By wisdomchuck in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 14, 2013, 7:20 PM
  5. TextField text disappearing
    By EzaBlade in forum 1.x Help
    Replies: 8
    Last Post: Apr 24, 2009, 7:46 AM

Tags for this Thread

Posting Permissions