我们如何在母版页上运行Web服务 [英] how we can run web services on the master page
本文介绍了我们如何在母版页上运行Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使Web服务在sql表中插入值,并且ut在任何普通的.aspx页上都可以成功运行,但是当我尝试在母版页上运行时,它没有显示错误,这里没有输出,代码是plz any body可以帮助我
i have made web service to insert values in the sql tables and ut runs successfully on any ordinary .aspx page but when i m trying to run this on the master page then its showing no error no output here is the code plz any body can help me out
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="WS1" runat="server">
<Services>
<asp:ServiceReference Path="~/WebServiceInsertValue.asmx" />
</Services>
</asp:ScriptManager>
FIRST NAME<asp:TextBox ID="Firstnametxt" runat="server"></asp:TextBox>
<br />
LAST NAME
<asp:TextBox ID="Lastnametxt" runat="server"></asp:TextBox>
<br />
EMAIL
<asp:TextBox ID="Emailtxt" runat="server" ></asp:TextBox>
<br />
MOBILE NO
<asp:TextBox ID="Mnumbertxt" runat="server" MaxLength="10"></asp:TextBox>
<br />
<asp:Button ID ="Sbmtbtn" runat="server" Text="Submit" OnClientClick="insert();" />
</div>
<script type="text/javascript">
function insert() {
var firstname = document.getElementById("Firstnametxt").value;
var Lastname = document.getElementById("Lastnametxt").value;
var Email = document.getElementById("Emailtxt").value;
var Mnumber = document.getElementById("Mnumbertxt").value;
WebServiceInsertValue.register(firstname, Lastname, Email, Mnumber);
alert("hello");
}
</script>
推荐答案
我已经使用clientid自己解决了
i have solved it my own using clientid
这篇关于我们如何在母版页上运行Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文