我正在使用 Noty 插件生成通知。但它不能正常工作。我也在使用 rad ajax 管理器。我的代码如下
<script type="text/javascript">
function noty_error(type_, text_) {
var n = noty({
text: text_,
type: type_,
dismissQueue: true,
layout: 'topCenter',
theme: 'defaultTheme',
timeout:2000
});
}
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="btn_add">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="txt_dept" />
<telerik:AjaxUpdatedControl ControlID="grid_dept" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="btn_cncl">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="txt_dept" />
<telerik:AjaxUpdatedControl ControlID="btn_add" />
<telerik:AjaxUpdatedControl ControlID="grid_dept" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="grid_dept">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="txt_dept" />
<telerik:AjaxUpdatedControl ControlID="btn_add" />
<telerik:AjaxUpdatedControl ControlID="grid_dept" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
在单击事件中,如果文本框内容为空,我需要生成通知,我的代码是
ScriptManager.RegisterStartupScript(this, typeof(Page), "onclick", "noty_error('warning','Oops!!! it looks like you have not entered anything');", true);
我需要立即解决。请帮助我。