PDA

View Full Version : [CLOSED] check request IsPostback in server control inherited by Ext.Net.Container



ViDom
May 13, 2013, 11:08 AM
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

Daniil
May 13, 2013, 11:20 AM
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);
}
}

ViDom
May 14, 2013, 8:20 AM
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.