我在主页面上有一个方法(非静态),将从内容页面Method(静态WebMethod)调用。 如 母版页: public partial class User : System.Web.UI.MasterPage
{
public void loadcart()
{
//some code here that i will a div
}
}
内容页: public partial
我想根据查询字符串返回对象。 例如,我想api/users/{id}?fields=username,email,reputation返回仅包含三个包含属性(用户名,电子邮件,信誉)的User类型的对象。 在附注中,默认情况下,在.NET Core中,逗号分隔的查询字符串是不可能的。 Here's a tutorial on making that work。 按照上面的指导,我有一个字符串列表。