[CLOSED] check request IsPostback in server control inherited by Ext.Net.Container

  1. #1

    [CLOSED] check request IsPostback in server control inherited by Ext.Net.Container

    Hi,
    Like in title how to accomplish such functionality with Ext.Net?:

    in userControl this can be done like this:
    ...
    if(!IsPostBack)
    {
     //do something
    }
    ...
    and in Ext.Net how can I do that?
    I'm aware about existing:
    if(Ext.Net.X.IsAjaxRequest){}
    Thanks,
    ViDom
    Last edited by Daniil; May 14, 2013 at 9:32 AM. Reason: [CLOSED]
  2. #2
    Hi @ViDom,

    Well, it is a Page's property. So, you need to access a Page instance.

    I would try something like this.

    Example
    class MyContainer : Container
    {
        protected override void OnInit(EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                // stuff
            }
            base.OnInit(e);
        }
    }
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @ViDom,

    Well, it is a Page's property. So, you need to access a Page instance.

    I would try something like this.

    Example
    class MyContainer : Container
    {
        protected override void OnInit(EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                // stuff
            }
            base.OnInit(e);
        }
    }
    I totally forgot about that. Thanks @Daniil:)
    thread can be closed.

Similar Threads

  1. [CLOSED] Best Way to Extend a ComboBox inherited Control
    By sisa in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 11, 2013, 4:27 PM
  2. [CLOSED] How to add 2 userControl inherited by Ext.Net.Container?
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Sep 21, 2012, 10:11 AM
  3. Replies: 2
    Last Post: May 31, 2011, 4:47 PM
  4. [CLOSED] Register javascript resource to inherited control
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 11, 2010, 8:24 PM
  5. Replies: 0
    Last Post: Jun 25, 2009, 11:52 AM

Tags for this Thread

Posting Permissions