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

浪淘沙11个月前后端189

  [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 sqlsugar timestamp 防sql注入方法

 string sql= "insert into ts (title,dx,zt,tsnr,tpe,jhsj,bz,guid)&...

asp.net core Aspose.Words 文本换行

using Aspose.Words;// 替换换行符为 Word 中的换行符var placeholders = new&nbs...

asp.net core url编码

using System.Text.Encodings.Web; string url = "测试 参数 &&nbs...

sqlite数据库备份

  public IActionResult OnPostBf()   {      ...

asp.net core rzaor page 中的ViewComponent 视图用法

asp.net core rzaor page 中的ViewComponent 视图用法

1、/Pages/Components 新建:MyViewComponent.csusing Microsoft.AspNetCore.Mvc; namespace xxts...

发表评论    

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