Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        WebUtility.ShowClientConfirm("Message", "Detailfdsafdsafsdafdsaf\nfdsafdsafsdafsdaf\nfdsafdsafdsafsdafsad", "titleOK",
                                     "OK", "cancel", null, "onCancel");
        wf.Width  = 500;
        wf.Height = 700;
        wf.Center = true;
        WebUtility.AdjustWindow(wf);

        String cbReference =
            Page.ClientScript.GetCallbackEventReference(this,
                                                        "arg", "ReceiveServerData", "context");
        String callbackScript;

        callbackScript = "function CallServer(arg, context)" +
                         "{ " + cbReference + ";}";
        Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
                                                    "CallServer", callbackScript, true);

        catalog = new System.Collections.Specialized.ListDictionary();
        catalog.Add("monitor", 12);
        catalog.Add("laptop", 10);
        catalog.Add("keyboard", 23);
        catalog.Add("mouse", 17);

        ListBox1.DataSource    = catalog;
        ListBox1.DataTextField = "key";
        ListBox1.DataBind();
    }