怎样点击一个button后,先调用发信的函数,然后在转到另一个页面?
--------------------编程问答-------------------- 你可以做一个判读:if (result == 1)
{
SendSms(sDst, content)
if(发信成功才跳转){
Response.Redirect("three.aspx");
}
} --------------------编程问答-------------------- 贴出
SendSms(sDst, content);
这个方法内容 --------------------编程问答-------------------- SendSms(sDst, content);里面出错了吧。断点跟踪下 --------------------编程问答-------------------- 把发信的函数设置返回值,这样应该就可以了
--------------------编程问答--------------------
if (result == 1)
{
if(SendSms(sDst, content))
{
Response.Redirect("three.aspx");
}
}
--------------------编程问答--------------------
bool SendSms(sDst, content)
{
.......
}
if(SendSms(sDst, content))
{
Response.Redirect("three.aspx");
}
if (result == 1)--------------------编程问答-------------------- 晕啊,你执行成功后返回true 判断在跳转啊 --------------------编程问答-------------------- 如何给username带参数?
{
if(SendSms(sDst, content))
{
Response.Redirect("three.aspx");
}
}
string username = reader["username"].ToString();
this.Response.Write("<script>top.location.href='three.aspx?username='; </script>");
补充:.NET技术 , ASP.NET