Beispiel #1
0
        public override void DataBind()
        {
            CustomPage page = this.Page as CustomPage;

            closeId = string.Format("{0}-close", this.ClientID);

            if (Closable)
            {
                if (page != null)
                {
                    page.RegisterLoadScript(closeId,
                                            string.Format("$('#{0}').click(function(){{lw.close('{1}', '{2}');}});",
                                                          closeId, ClientID, CloseEffect));
                }
            }
            if (AutoHide)
            {            /*
                          *     page.RegisterLoadScript(ClientID,
                          *                     string.Format(@"window.setTimeout(function(){{
                          * try{{lw.AutoHide('{0}', '{1}');}}catch(e){{}}
                          * }}, {2});", ClientID, CloseEffect, HideAfter));
                          * */
            }

            base.DataBind();
        }
Beispiel #2
0
        public override void DataBind()
        {
            if (bound)
            {
                return;
            }
            bound = true;

            //System.Web.UI.WebControls.Panel panel = new System.Web.UI.WebControls.Panel();
            //panel.ID = this.ID;
            //this.Controls.Add(panel);

            CustomPage p = this.Page as CustomPage;

            if (p != null)
            {
                p.RegisterScriptFile(this._scriptId, "http://maps.google.com/maps?file=api&v=2&key=" + Key);
                p.RegisterScriptFile(this._scriptId + "_Local", string.Format("{0}/js/Maps.js", WebContext.Root));

                p.RegisterLoadScript("load map", string.Format("lw_map.init(\"{0}\");", this._id), true);
            }
            base.DataBind();
        }