Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is Page Init the right place for this code?
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
AJAX
Title:
Is Page Init the right place for this code?
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01307437
Message ID:
01307437
Views:
46
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
Reply
Map
View

Click here to load this message in the networking platform