我需要从服务器返回HttpPost方法中的链接,如果ajax返回成功,则需要使用Javascript代码进行重定向。
我正在使用WebMethod,并返回字符串,但是下面的代码未执行
ScriptManager.RegisterClientScriptBlock((Page)(HttpContext.Current.Handler),typeof(Page),"Alert","alert('stackoverflow.com');",true);
谢谢。
我的下面的代码
[WebMethod()]
public static string ChkToken(string data)
{
string link = "https://stackoverflow.com/";
ScriptManager.RegisterClientScriptBlock((Page)(HttpContext.Current.Handler),true);
return link;
}