[CLOSED] FileUploadField control cause App.direct in javascript onunload method not executed

  1. #1

    [CLOSED] FileUploadField control cause App.direct in javascript onunload method not executed

    I have a page needing upload file. And I want to remove the session When I close the page.

    But when I place the FileUploadField control, the App.direct.ClearBizState() in javascript onunload method does not executed.

    Why? Who can help me.
    <script runat="server">
            [DirectMethod]
            public void ClearBizState()
            {
                 Session.Remove("AAA");
            }
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script type="text/javascript" language="javascript">
    
            onunload = function () {
                
                App.direct.ClearBizState();
            };
    </script>
    
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
           <ext:ResourceManager runat="server" />
              <ext:FileUploadField ID="BasicField" runat="server" ButtonText="choose..." Width="420"    Icon="Attach" />
           
        </div>
        </form>
    </body>
    </html>
    Last edited by Daniil; Aug 13, 2013 at 12:37 PM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Try this
    [DirectMethod(Type=DirectEventType.Load)]
  3. #3

    It is ok.

    Thank you.

Similar Threads

  1. [CLOSED] How to control ajax request (direct method)
    By bakardi in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 07, 2012, 1:33 PM
  2. Replies: 2
    Last Post: Oct 12, 2011, 7:49 AM
  3. Replies: 8
    Last Post: Jan 25, 2011, 4:21 AM
  4. [CLOSED] Direct Method From Javascript
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 17, 2010, 11:17 AM
  5. Replies: 8
    Last Post: Jun 24, 2010, 9:39 PM

Tags for this Thread

Posting Permissions