惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
S
Securelist
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threat Research - Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
I
Intezer
G
GRAHAM CLULEY
Spread Privacy
Spread Privacy
T
Tor Project blog
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
L
Lohrmann on Cybersecurity
Schneier on Security
Schneier on Security
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
S
Security @ Cisco Blogs
The Register - Security
The Register - Security
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
L
LangChain Blog
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
The Hacker News
The Hacker News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
博客园 - 叶小钗
Attack and Defense Labs
Attack and Defense Labs
Webroot Blog
Webroot Blog
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
T
Troy Hunt's Blog
V
Visual Studio Blog
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
Arctic Wolf
T
The Exploit Database - CXSecurity.com
宝玉的分享
宝玉的分享
Vercel News
Vercel News
D
DataBreaches.Net
P
Palo Alto Networks Blog
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

博客园 - kobe

.net 7 session支持 windows redis常用 GO语言Windows安装和VScode配置 ASP.NET CORE 托管IIS第一次访问慢 .netcore发布托管IIS后 swagger显示404 dotnet run .net core web html中午查看源码显示乱码 centos netcore开机启动 NetCore Razor 路由伪静态设置 net core 6.0 session支持,非controller引用session net core web项目(net 6.0)增加apicontroller JPush,Jverify,JCore Ios冲突 apiRecord:methodName service mysqld restart 无效 Python log Python Flask+Windows Service制作 Windows下删除.svn文件夹 C# LINQ list遍历并组装返回新查询 windows server 2016下360wifi安装 Python获取本机多IP并指定出口IP
.Net Razor Ajax Post Get处理
kobe · 2024-04-26 · via 博客园 - kobe

Talk is cheap,Show me the code.

.cshtml

复制代码

  let pdata = { "weight": 50, "origin": originSel.value, "destination": destinationSel.value };
  let r = await axios.post("/search?handler=list" , pdata).catch(() => null);
  console.log(r);

复制代码

.cs 注意参数要加【FromBody】,get的话 OnGetList

复制代码

  public ActionResult OnPostList([FromBody]Ly.Model.FromBody.SearchRequestInfo requestInfo)
  {
    var list = _priceService.Search(requestInfo.Origin,requestInfo.Destination,requestInfo.Weight);
    return new JsonResult(list);
  }

复制代码