前台
<head runat="server">
<title>无标题页</title>
<script src="JScript1.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input id="Button2" type="button" value="button" onclick="abc()"/>
</div>
</form>
</body>
后台 protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
} [AjaxPro.AjaxMethod]
public int abc()
{
int i=0;
string a = TextBox1.Text;
if ( a== "aa")
{
i = 1;
}
else
{
i = 2;
}
return i; }js文件function abc()
{
var i=WebApplication1._Default.abc().value;
if(i==1)
{
alert("aa");
}
else if(i==2)
{
alert("other");
}
}设置断点,运行到string a = TextBox1.Text;就不执行了,也不报错或者异常
应该怎么取啊,请大侠告知
<head runat="server">
<title>无标题页</title>
<script src="JScript1.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input id="Button2" type="button" value="button" onclick="abc()"/>
</div>
</form>
</body>
后台 protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default));
} [AjaxPro.AjaxMethod]
public int abc()
{
int i=0;
string a = TextBox1.Text;
if ( a== "aa")
{
i = 1;
}
else
{
i = 2;
}
return i; }js文件function abc()
{
var i=WebApplication1._Default.abc().value;
if(i==1)
{
alert("aa");
}
else if(i==2)
{
alert("other");
}
}设置断点,运行到string a = TextBox1.Text;就不执行了,也不报错或者异常
应该怎么取啊,请大侠告知
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货