115账号,皇上娘娘要爬墙,邹奇奇
方法一:
int i=0;
if (!int.tryparse(this.txtpage.text, out i))
{
response.write("<script>alert('请输入有效数字!')</script>");
this.txtpage.text = string.empty;
}//判断是否是数字
方法二:
try
{
if (convert.toint32(this.txtpage.text) > totalpage || convert.toint32(this.txtpage.text)<1)
{
clientscript.registerclientscriptblock(gettype(), "提示", "alert('请输入有效数字!')", true);
}
else
{
viewstate["pageindex"] = this.txtpage.text;
getdata();
}
}
catch (exception)
{
clientscript.registerclientscriptblock(gettype(), "提示", "alert('请输入有效数字!')", true);
}
摘自 淡蓝蓝蓝
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论