Page 1 of 1

Page Enter Page_PreInit event Over ten times

Posted: Sun Aug 31, 2014 10:26 am
by a.ebbini
I had a problem when i put StiWebViewer to any WebForm the behavior of the page go strange it will enter Page_PreInit event over 10 times the problem i have some code must be put it in PreInit event so how can i avoid this behavior

Re: Page Enter Page_PreInit event Over ten times

Posted: Mon Sep 01, 2014 11:16 am
by Vladimir
Hello,

Please try to use the following code:

Code: Select all

    protected void Page_PreInit(object sender, System.EventArgs e)
    {
        if (Page.Request.QueryString.ToString().IndexOf("stimulsoft_") < 0 && Page.Request.QueryString.ToString().IndexOf("sr_") < 0)
        {
            var str = string.Empty;
            // Some actions
        }
    }
Thank you.