如何获取<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#多个线程访问一个队列问题,请大侠们帮帮忙 从access数据库oledb字段读出jpg文件在pictureBox1中显示问题 c# 可变参数的函数 C# WMI开发,怎么取到“每秒钟页读取数”,“磁盘时间”,请高手指点? 求助!菜鸟使用多线程后无法正常退出程序的问题。 有没有人会将gridview的数据传到数据库啊 哪位帮帮忙 C号问题 求教,服务器控件报错啊 未将对象引用到对象的实例 WebForm我全部动态产生一个datagrid,怎么加入按钮列,还有怎么取得它的事件?我昨天研究了一天,没什么突破,我查找了以前的帖子,没发现 关于上传图片问题 数据集如何绑定到水晶报表中
<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上面插入就行了