如何获取<input type="submit" value="确定提交" name="submit">事件 我想当点击 input 的时候向数据库插入数据。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 加上runat="server" 后台添加方法 没有 RUN SEVER?? 没有后台操作的普通JS能操作db 吗? 想用JS的话就建个.ashx把方法写里面,然后再用JS调用就可以不用在底层写一行代码。 可以的话帮我写一个js掉用input事件的方法 页面放一个 <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="True" /> <img src="images/upinfo.gif" border="0" onclick="UpdateOrderInfo();" style="cursor:pointer" /> 然后 PageMethods.UpdateOrderInfo($('txtCity').value, Result);function Result(res) { if (res == "Access") window.location.href = "GouWuCheTwo.aspx"; else window.location.href = "DengLu.aspx?url=" + document.URL;}后台写 [System.Web.Services.WebMethod] public static string UpdateOrderInfo(string city) { if ()//成功 { return "Access"; } else { return "NoAccess";} } post提交,直接在后台 接受数据就行了 Request.Form["name"]; 可以另写一个aspx文件来插入,跟php那种类似<form id="form1" name="form1" method="post" action="Add.aspx">比如说上面那行代码,你就可以在add.aspx上面插入就行了 委托和事件 c#中SendKeys.Send 如何输入汉字 我这样写可以吗? 管理报表的系统应该如何架构 关于触发器的理解,请帮帮忙谢谢了 datagridview 保存数据 不用adox如何用.NET创建Access数据库 webForm中 GridView当没有数据时如何让它把标题显示出来????? C#程序编译出现错误.. [STAThread]的问题 关于上传图片问题 数据集如何绑定到水晶报表中
<img src="images/upinfo.gif" border="0" onclick="UpdateOrderInfo();" style="cursor:pointer" />
然后 PageMethods.UpdateOrderInfo($('txtCity').value, Result);
function Result(res) {
if (res == "Access")
window.location.href = "GouWuCheTwo.aspx";
else
window.location.href = "DengLu.aspx?url=" + document.URL;
}
后台写
[System.Web.Services.WebMethod]
public static string UpdateOrderInfo(string city)
{
if ()//成功
{ return "Access"; }
else
{ return "NoAccess";}
}
<form id="form1" name="form1" method="post" action="Add.aspx">比如说上面那行代码,你就可以在add.aspx上面插入就行了