我是asp.net核心和Razor的新手,我正在尝试从cshtml页面调用一个函数到他的内部cs页面: <button onclick="@{Model.GetUserInfo(1);};" typeusing (var client = new HttpClient()) var response = client.GetAsync($"localhost:44322/apivar body =
我正在制作Razor应用程序,我使用HttpClient从PageModel向某个API发出请求。(ApiClient基本上是从HttpClient派生的类 public IndexModel(ApiClientvar status = response.StatusCode; // If status == BadRequest, redirect to Error.html }如果从<e