0
我在我的项目中使用radcontrols,我想限制radTextboxes不应该让特殊字符,所以我使用脚本函数里面我的aspx页面它工作正常,但我想要在整个项目中使用这个,所以我想维护一个JavaScript文件,我想使用该功能,所以帮助我如何通过文本框ID和通知ID来传递函数。这里是我的代码如何查找Radnotification id里面的javascript文件函数
ASPX
脚本文件
function valueChangedHandler(sender, eArgs) {alert("Done");
var pattern = /^[a-zA-Z0-9\s]*$/;
var value = sender.get_value();
var matchArray = value.match(pattern);
if (matchArray == null) {
var notification = $find("<%=lblNotification.ClientID %>");
notification.set_text('Enter AlphaNumerics Only!');
notification.show();
sender.clear();
sender.focus();
exit();
}
}
通知代码
<telerik:RadNotification runat="server" BorderColor="Black" BorderStyle="Solid" BackColor="ActiveBorder" BorderWidth="4" EnableRoundedCorners="true" EnableShadow="true" ID="lblNotification" Position="BottomRight" ShowCloseButton="true" Opacity="90" Title="Result" VisibleTitlebar="False">
</telerik:RadNotification>
上述工作正常,但我没有得到通知消息,所以告诉我如何传递通知ID。有一个小例子。