<script language="javascript" type="text/javascript">
function img1_onclick()
{
var a=$get("img1").src;
var b=$get("Label5").value;
// alert(a+b);
ShoppingCart.Geturl(a,b,GetResult);
}
function GetResult(result)
{
alert(result.toString());
}
</script>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/WebServives/ShoppingCart.asmx" />
</Services>
</asp:ScriptManager>
function img1_onclick()
{
var a=$get("img1").src;
var b=$get("Label5").value;
// alert(a+b);
ShoppingCart.Geturl(a,b,GetResult);
}
function GetResult(result)
{
alert(result.toString());
}
</script>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/WebServives/ShoppingCart.asmx" />
</Services>
</asp:ScriptManager>
解决方案 »
- 为什么取不到checkbox的值
- 关于基本概念的问题,请大家帮忙解答,谢谢!
- ajax.net不能返回服务器控件的值?
- 求助:谁有VS2005工具箱里面的控件介绍啊???我看不懂那些因为名称的控件,不知道是做什么用的?
- 急救:关于.NET的安装,注册
- 对于大家来说很简单的问题,为什么点击按钮不显示新页面?
- Asp.net如何实现文件上传后使用杀毒软件对上传文件查杀病毒?
- win2008 r2系统下iis7.5 一级目录静态文件打不开
- mvc4环境下使用ajax实现跨域请求
- 强烈推荐:Crystal Decisions 官方示例程序——Underground Office Supply(搜集:海波.NET)
- asp.net页面级事务怎么写啊,我给忘了,加急
- web项目发布。一些项目文件无法发布到bin
WebService地址你可以运行看看浏览器地址中的地址
[System.Web.Script.Services.ScriptService]
[WebService(Namespace = "http://")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class Service : System.Web.Services.WebService
{}
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Web.Script.Services;namespace everpretty.WebServices
{
/// <summary>
/// ShoppingCart 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
[System.Web.Script.Services.ScriptService]
public class ShoppingCart : System.Web.Services.WebService
{ [WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public string Geturl(string url,string tmpstring)
{
return url;
}
}
}
错误: 'ShoppingCart' 未定义