[CLOSED] TextField Reset Text from ServerSide Not Working

  1. #1

    [CLOSED] TextField Reset Text from ServerSide Not Working

    hi,

    why after I clear the TextField Text in the server side "TextField.Clear()" it's not working??
    same thing when I try to set it also...

    i.e.,

    Markup:
        <ext:Button runat="server" ID="btnAdd" Icon="Add" FieldLabel="Add">
            <DirectEvents>
               <Click OnEvent="btnAdd_Click" ></Click>
           </DirectEvents>
        </ext:Button>
    
        <ext:TextField runat="server" ID="txtName" FieldLabel="Name" />
    Code Behind:
    protected void btnAdd_Click(object sender, EventArgs e)
            {
                txtName.Text = "Any New Text";
    
            }
    Its not always an option for me to use "this.getForm().reset();" in which server side controls reset serve critical requirements for me.
    Please Help ASAP.
  2. #2

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    Hi,

    I think you just need to use DirectEventArgs instead of EventArgs.


    Example


    protected void btnAdd_Click(object sender, DirectEventArgs e)

    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    no that's didn't work :(

  4. #4

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    webclouder (5/11/2010) no that's didn't work :(
    I tried your code sample and it appears to work as expected.


    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    Do you have any Special code in the ResourceManager!!

        <ext:ResourceManager ID="ScriptManager1" runat="server" />
    I'm using the Coolite version of May 2'nd, 2010


    I'll get the last version and check if it's gonna work.
  6. #6

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    hi,

    I updated my version of Coolite [1.0] and still having the same problem I attached a test page that include the same example shown above.

    please test that page inside clean web project with Ext.Net as Reference to the project.

    I failed to make it work with Ext:Button but normal asp button reset it since its do full post back.....by the way, what's the difference between the coolite controls direct event click and the click event in normal asp controls??
  7. #7

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    Hi,

    Your sample works correctly for me. Are you sure that you registered DirectRequestModule in the web.config?
    <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />

  8. #8

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    yes i have that line in my web.config in "httpModules" section, I'm using IIS 6 not the web-development-server.

    when I put Breakpoint in the Click EventHandler Body it's break successfully and the textField value cleared but in the browser (Firefox, IE 8) nothing change :(
  9. #9

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    Hi,

    Please create test project and post it (do not attach any assemblies). We need test project because test sample works fine for us. May be problem in the web.config or somewhere else
    Just ensure that test project reproduces the problem
  10. #10

    RE: [CLOSED] TextField Reset Text from ServerSide Not Working

    ThanXXXXXXXXXXXXX very Muchhhhhhhhh!!!!

    the problem was in web.config:

    <httpModules>
          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <!--<add name="AjaxRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />-->
          <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
        </httpModules>
    Sounds like the "AjaxRequestModule" was preventing "DirectRequestModule" from doing its job?? so I commented and everything worked like charm.

    Thanks again,

Similar Threads

  1. [CLOSED] Get Dynamic TextField Text...
    By gs_user in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: Apr 24, 2012, 3:56 AM
  2. ext:TextField text wrap please help
    By gopikrishna in forum 1.x Help
    Replies: 0
    Last Post: Feb 14, 2011, 7:50 AM
  3. [CLOSED] Form reset not working
    By ljcorreia in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 22, 2010, 7:01 AM
  4. [CLOSED] Cannot set the text in a TextField
    By iansriley in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 12, 2010, 4:34 PM
  5. TextField text disappearing
    By EzaBlade in forum 1.x Help
    Replies: 8
    Last Post: Apr 24, 2009, 7:46 AM

Posting Permissions