Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is Page Init the right place for this code?
Message
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
AJAX
Titre:
Is Page Init the right place for this code?
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01307437
Message ID:
01307437
Vues:
45
Hi everybody,

I'm wondering where the following code should go and do you think it may have something with the intermittent problem I'm getting:

http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx
protected void Page_Init(object sender, EventArgs e)
    {
        //this.btnCancelProfile.Attributes["onclick"] = "HideElement('" + this.tblProInfo.ClientID + "');" ;
        this.btnCancelProfile.Attributes["onclick"] = "ToggleDisplay('true','GridInfo','" +
            this.drpSelRole.ClientID + "','" + this.grdvwUsers.ClientID +
            "');ToggleDisplay('false','" + this.tblProInfo.ClientID + "','" + 
            this.lblProfStat.ClientID  +  "');return false;";

        this.btnSaveProfile.Attributes["onclick"] = "ToggleDisplay('true','GridInfo','" +
            this.drpSelRole.ClientID + "','" + this.grdvwUsers.ClientID +
            "');ToggleDisplay('false','" + this.tblProInfo.ClientID + "','" + 
            this.lblProfStat.ClientID  +  "');"; 

        this.btnAddToRole.Attributes["onclick"] = "return CheckSelected('" + this.lsbUsers.ClientID +
                                                 "','Please select Users') && CheckSelected('" +
                                                 this.LsbRoles.ClientID + "','Please select Roles');";     
        
    }
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform