我在主頁面上有一個方法(非靜態),將從內容頁面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。 按照上面的指導,我有一個字符串列表。