[CLOSED] [#1389] [4.2.0] TextField - CodeBehind problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] [#1389] [4.2.0] TextField - CodeBehind problem

    Hi,

    I just start using Ext.Net Mobile Web Forms. As old Ext.Net WebForms developer, i tried to apply the same approach.

    Here an example using TextField and two buttons:

    Markup:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Mobile.WebForm1" %>
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET Mobile Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        
        <ext:Viewport ID="Viewport1" runat="server" Layout="VBoxLayout" Padding="10">
            <Items>
                <ext:FormPanel
                    ID="FormPanel1"
                    runat="server" >
                    <Items>
                        <ext:TitleBar ID="TitleBar1" runat="server" Docked="Top">
                            <Items>
                                <ext:Button ID="Button1" runat="server" Text="Get" OnClientTap="INTG.GetFormValues();" />
                                <ext:Button ID="Button2" runat="server" Text="Set" OnClientTap="INTG.SetFormValues();" />
                            </Items>
                        </ext:TitleBar>
                        <ext:FieldSet
                            ID="FieldSet1"
                            runat="server"
                            <Items>
                                <ext:TextField ID="TextField1" runat="server" Label="Title" Text="test" />
                            </Items>
                        </ext:FieldSet>
                    </Items>
                </ext:FormPanel>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    CodeBehind:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Ext.Net.Mobile;
    
    namespace Mobile
    {
        public partial class WebForm1 : System.Web.UI.Page
        {
            [DirectMethod(ShowMask = true)]
            public void SetFormValues()
            {
                TextField1.Text = "TESSSSSST";
            }
    
            [DirectMethod(ShowMask = true)]
            public void GetFormValues()
            {
                X.Msg.Alert("", TextField1.Text).Show();
            }
        }
    }
    The problem is that im not able to change the TextField text from codeBehind.

    Any idea?
    Last edited by fabricio.murta; Nov 02, 2016 at 4:10 AM.

Similar Threads

  1. [CLOSED] TextField in codebehind
    By vgvallee in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jul 10, 2013, 8:14 PM
  2. Replies: 0
    Last Post: Aug 01, 2012, 1:20 AM
  3. Problem getting Gridfilter settings in codebehind
    By plykkegaard in forum 1.x Help
    Replies: 0
    Last Post: Nov 22, 2009, 6:22 PM
  4. Replies: 0
    Last Post: Nov 18, 2009, 1:50 PM
  5. Replies: 2
    Last Post: Jul 08, 2009, 12:37 PM

Posting Permissions