刚学asp.net有点问题,请指教~一个web服务代码:
<% @ WebService Language="c#" Class="Greetings" %>
using System.Web.Services;
public class greetings
{
[WebMethod]
public string hello(string strname)
{
return "hello,"+strname+",have a great day!";
}
}请问我用浏览器打开后提示如下:
分析器错误信息: 未能创建类型“Greetings”。
源错误:
行 1:
行 2: using System.Web.Services;
行 3: public class greetings请问我该怎么办?在iis属性里我是选中的asp.net2。0啊~
<% @ WebService Language="c#" Class="Greetings" %>
using System.Web.Services;
public class greetings
{
[WebMethod]
public string hello(string strname)
{
return "hello,"+strname+",have a great day!";
}
}请问我用浏览器打开后提示如下:
分析器错误信息: 未能创建类型“Greetings”。
源错误:
行 1:
行 2: using System.Web.Services;
行 3: public class greetings请问我该怎么办?在iis属性里我是选中的asp.net2。0啊~
改成
public class Greetings注意C#区分大小写