예제 #1
0
    protected void setupShowHidePanelsScripts()
    {
        var    scriptLocation = "MemberSuite.SDK.Web.Controls.ShowHideFieldPanels.js";
        string script         = EmbeddedResource.LoadAsString(scriptLocation, Assembly.GetAssembly(typeof(CascadingDropDownManager)));

        script = script.Replace("%displayTypeDropDownID%", ddlDisplayType.ClientID).Replace("%dataTypeDropDownID%", ddlDataType.ClientID);
        ClientScript.RegisterClientScriptBlock(typeof(string), "onchangeScript", script, true);
        ClientScript.RegisterStartupScript(typeof(string), "showValues", "<script>showAppropriatePanelsForDisplayType(); </script>");

        ddlDataType.Attributes["onchange"]    += "showAppropriatePanelsForDisplayType(  );";
        ddlDisplayType.Attributes["onchange"] += "showAppropriatePanelsForDisplayType(  );";
    }