bootstrap警报类麻烦 [英] bootstrap alert class trouble

查看:84
本文介绍了bootstrap警报类麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是我所有麻烦的详细信息。我已经发布了相同类型的问题,但是没有正确解释。

这里是我的page.cs代码处理警报消息。

here is the detail of all my trouble.sorry i have already posted same type of Question but that one is not properly explained.
here is my page.cs code which is handling the alert message.

  public virtual Literal MsgLitteral
    {
        get
        {
            return  (Literal)Master.FindControl("alert");
        }
    }

    protected virtual string ModuleName { get { return string.Empty; } }
if (MsgLitteral != null)
        {
            string isChecked = Session["isChecked"] == null ? string.Empty : Session["isChecked"].ToString();
            if (isChecked == "False" && Session["queryStatus"] != null && Session["notification"] != null)
            {
                MsgLitteral.ShowNotification(Session["notification"], Session["queryStatus"]);
                Session["isChecked"] = true;
            }
            else
            {
                MsgLitteral.Visible = false;
            }
        }


        base.OnLoad(e);
    }

    protected virtual void HandException(Exception ex)
    {
        if (MsgLitteral != null)
        {
            MsgLitteral.ShowNotification(ex.Message.ToString(), false);
        }
    }

    protected void Redirect(string url, string message = null)
    {
        if (string.IsNullOrEmpty(message))
            Session["notification"] = _queryStatus ? string.Format("{0} Saved Successfully", ModuleName)
                : string.Format("Error creating new {0}", ModuleName);
        else
            Session["notification"] = message;

        Session["queryStatus"] = _queryStatus;
        Session["isChecked"] = false;
        Response.Redirect(url);
    }

}
here is my site.master code where i call alert function in asp literal 
<pre lang="HTML"><form  runat="server" role="form">
                              

                                
                                     <script>
                                       {
                                             $('.date-picker').datepicker({ dateFormat: 'dd/mm/yyyy' });
                                             $('.search-select').select2();
                                             $('.time-picker').timepicker();
                                             $('.alert').delay(1000).fadeOut();
                                                                                         
                                         }
                                       Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                                   </script>




<asp:UpdatePanel runat="server">
                                               <ContentTemplate>
                                                   <asp:Literal  runat="server" ID="alert" ></asp:Literal>
                                                   <asp:ContentPlaceHolder runat="server" ID="MainContent" ></asp:ContentPlaceHolder>
                                               </ContentTemplate>
                                           </asp:UpdatePanel>



问题是当数据插入正确成功的消息时被展示。但当我点击使其消失时它不会出现也不会出现fadeout.plz帮助我,我被困在其中2天


Problem is that when data is inserted properly successful message is displayed. but when i clicked to make it disappear it does not appear nor fadeout.plz help me i am stuck in it for 2 days

推荐答案

' .date-picker')。datepicker({dateFormat:' dd / mm / yyyy'});
('.date-picker').datepicker({ dateFormat: 'dd/mm/yyyy' });


' 。search-select')。select2();
('.search-select').select2();


' 。time-picker')。timepicker();
('.time-picker').timepicker();


这篇关于bootstrap警报类麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆