普能html页面post到 cshtml页面,出现400错误解决方法

浪淘沙5个月前后端98

  [IgnoreAntiforgeryToken]

  public class keywordsModel : PageModel

  {


      private readonly SqlSugar.ISqlSugarClient _db;

      public keywordsModel(SqlSugar.ISqlSugarClient db)

      {

          this._db = db;

      }

      public IActionResult OnGet()

      {

          return Page();

      }



      public IActionResult OnPost()

      {

          var keywords = Request.Form["keywords"];

          return Content(keywords);

        

      }

  }



相关文章

asp.net core C# json

 var schoolKc = OrderDectailKc(ColRowData.ToString()).Result; JObject jsonObject = JObject...

asp.net core url编码

 HttpUtility.UrlEncode("https://fdy.eduw.cn/zf/index")...

返回月份当天日期

  int daysInMonth = DateTime.DaysInMonth(_yf.Year, _yf.Month);...

asp.net core razor 输出html

@Html.Raw(Model.HtmlContent)...

asp.net core return Content 返回可解析的html

return Content(     "<!DOCTYPE html><html><body&g...

点击按钮,禁用提示,加导出word

@page @model xxtsoft.Web.Entry.Pages.sysadmins.kh.kh_outModel @{     Lay...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。