我想知道这些页面是如何工作的!像这样 :
https://stackoverflow.com/questions/ask
地址末尾没有扩展名!
这是直接调用webmethods的方法吗?!我写了这个页面,但我认为它不对!
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string name= Request.QueryString["name"];
if (Request.PathInfo == "/SayHi")Response.Write( SayHi(name));
}
[WebMethod]
public static string SayHi(string name)
{
return "Hi " + name;
}
//[WebMethod]
//public static string SayHi()
//{
// return "Hi ";
//}
}