views:

99

answers:

2

I have a base page class where i set client target with

    protected override void FrameworkInitialize()
{
    base.FrameworkInitialize();
    ClientTarget = "ie5";
}

for standart rendering for all browser. I now i need to change it to it's original state (auto?) for a single page that inherits my base page class.

How can i do it?

Thanks

UPDATE: I think i managed to do it with

        HttpBrowserCapabilities bc = Request.Browser;
    if (bc.SupportsXmlHttp == false)
    {
        Page.ClientTarget = "ie4";
    }
A: 

could you not override the method again?

protected override void FrameworkInitialize()
{
    base.FrameworkInitialize();
    ClientTarget = "auto";
}
LorenVS
"ClientTarget is set to an invalid alias 'auto'. The <clientTarget> configuration section is used to define ClientTarget aliases."I am basically trying to use .nets auto dedection to give support to non ajax enabled phone browsers. In default mode .net uses post back if it beleives browser is not ajax capable
nLL
A: 

HttpBrowserCapabilities bc = Request.Browser; if (bc.SupportsXmlHttp == false) { Page.ClientTarget = "ie4"; }

nLL