Results 1 to 3 of 3

Thread: __doPostBack() not on page [Resolved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    __doPostBack() not on page [Resolved]

    ASP.Net has stopped putting the javascript it uses to raise events off all my pages.......

    why does ASP.Net hate me...?

    I have two Page class between myself and the original UI.Page class. I am calling bas.OnLoad(e) in each of these classes so the page load should be reached no problem.......


    PHP Code:
        public class Page System.Web.UI.Page
        
    {
            protected 
    internal bool _useSessionViewState false;
            
    /// <summary>
            /// Save ViewState.
            /// </summary>
            /// <param name="viewState">The ViewState.</param>
            
    protected override void SavePageStateToPersistenceMedium(object viewState)
            {
                if(
    _useSessionViewState)
                {
                    
    this.Session[this.Request.Path "-vstate"] = viewState;
                }
                else
                {
                    
    base.SavePageStateToPersistenceMedium(viewState);
                }
            }
            
    /// <summary>
            /// Load ViewState.
            /// </summary>
            /// <returns>The ViewState.</returns>
            
    protected override object LoadPageStateFromPersistenceMedium()
            {
                if(
    _useSessionViewState)
                {
                    if(
    this.Session[this.Request.Path "-vstate"] == null)
                    {
                        
    this.Response.Redirect(this.Request.ApplicationPath);
                    }
                    return 
    this.Session[this.Request.Path "-vstate"];
                }
                else
                {
                    return 
    base.LoadPageStateFromPersistenceMedium();
                }
            }
            
    /// <summary>
            /// Fires when a page is loaded.
            /// </summary>
            /// <param name="e">In passed Event Arguments.</param>
            
    protected override void OnLoad(System.EventArgs e)
            {
                
    //add quick post back command handler
                
    Page.RegisterClientScriptBlock("-exPostBackCommandHandler"Helpers.Read.ResourceString("PKPromo.Web.JavaScript.PostBackHandler.js"));
                
    //add basic cross browser dhtml functions
                
    Page.RegisterClientScriptBlock("-exDHTML-API"Helpers.Read.ResourceString("PKPromo.Web.JavaScript.DHTML-API.js"));
                
    //add popup window js
                
    Page.RegisterClientScriptBlock("-exDPopUp"Helpers.Read.ResourceString("PKPromo.Web.JavaScript.Popup.js"));
                
    //init dhtml scripting
                
    Page.RegisterStartupScript("-exInitDHTML-API""<script language=\"JavaScript\">pk_InitializeDHTMLLib();</script>");

                
    System.Text.StringBuilder sbld = new System.Text.StringBuilder();
                
    string ticker ""
                
    sbld.Append("<script language=\"JavaScript\">\r\n");
                
    sbld.Append("    var ___tickMessage = \"PK Promotions ~ Custom Importing and Exporting.\";\r\n");
                
    sbld.Append("    window.defaultStatus = ___tickMessage;\r\n");
                
    sbld.Append("    //setInterval(\"if(window.status != ___tickMessage){window.status = ___tickMessage;}\", 5);//window.status = __tickCache;\r\n");
                
    sbld.Append("</script>\r\n");
                
    ticker sbld.ToString();
                
    Page.RegisterClientScriptBlock("-statusTicker"ticker);
                
    sbld null;

                
    //Proccess PostBack Commands Raised from client script
                
    if(Request["__EVENTTARGET"] == "PostBackCommand" && Request["__EVENTARGUMENT"] != null && IsPostBack)
                {
    PostBackCommand(Request["__EVENTARGUMENT"]);}

                
    //write signutare
                
    Response.Write("<!--    /***************************************************************");
                
    Response.Write("\r\n");
                
    Response.Write("    *");
                
    Response.Write("\r\n");
                
    Response.Write("    *    [url]http://www.pkpromo.com[/url]");
                
    Response.Write("\r\n");
                
    Response.Write("    *");
                
    Response.Write("\r\n");
                
    Response.Write("    *    Development and Design:");
                
    Response.Write("\r\n");
                
    Response.Write("    *    Ezekiel Naulty [[email protected]]");
                
    Response.Write("\r\n");
                
    Response.Write("    *    And");
                
    Response.Write("\r\n");
                
    Response.Write("    *    Gabriel Martin [[email protected]]");
                
    Response.Write("\r\n");
                
    Response.Write("    *");
                
    Response.Write("\r\n");
                
    Response.Write("    *    Project Began: April 2004");
                
    Response.Write("\r\n");
                
    Response.Write("    *    Project Last Updated: August 2004");
                
    Response.Write("\r\n");
                
    Response.Write("    *");
                
    Response.Write("\r\n");
                
    Response.Write("    ************************************************/            -->");
                
    Response.Write("\r\n");
                
    base.OnLoad(e);        
            }
            
    /// <summary>
            /// 
            /// </summary>
            /// <param name="command"></param>
            
    protected virtual void PostBackCommand(string command){}

        } 
    PHP Code:
        public class User Page
        
    {
            
    /// <summary>
            /// 
            /// </summary>
            /// <param name="e"></param>
            
    new protected virtual void OnLoad(System.EventArgs e)
            {
                
                if(!((
    PKPromo.Business.Contacts.Security.LoginResults)Session["-login"]).IsAllowed){this.Response.Redirect(this.Request.ApplicationPath);}
                
    base.OnLoad(e);
            } 
    Last edited by Magiaus; Aug 26th, 2004 at 01:21 PM.
    Magiaus

    If I helped give me some points.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width