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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - 虚空境界

当WEB站点应用程序池标识为ApplicationPoolIdentity,出现运行错误时的解决方法 sql表设计器的几个默认值 easyui中tree型控件不正常显示的处理方法 mvc中ajax.beginform一次提交重复Post两次的问题解决 JQuery EasyUI弹出对话框解决Asp.net服务器控件无法执行后台代码的方法(转) ASP.NET验证控件RegularExpressionValidator的常见表达式 后台动态设置前台标签内容和属性(转自http://www.wzsky.net/html/Program/net/26171.html) ASP.NET中使用 Response.Write("<script>alert('****');</script>");后CSS界面发生变化的解决方法 (经验证) silverlight控件如何自适应 “System.ServiceModel.DomainServices.Client.DomainOperationException:查询"XXX"load操作失败,远程服务器返回了错误:NoFound.……”解决方法 按规定长度显示指定绑定字段的内容 asp.net中使用ckfinder2选择图片并返回图片文件的路径的代码 CKEditor3.6.1+CKFinder2.0.2结合 打造"帅"的编辑器 For .Net WEB.CONFIG资料收集 ckeeditor和ckfinder在asp.net中的使用 用户体验的网站首页设计的准则 开发播放器中所学/用到的知识 关于使用IDE制作样式表后不能正常显示的问题 域用户组策略禁用QQ等软件 域用户组策略设定IE主页
Ajax.ActionLink与Ajax.BeginForm使用场所的思考
虚空境界 · 2015-03-19 · via 博客园 - 虚空境界

Ajax.ActionLink使用在提交参数明确的情况下,如:

Ajax.ActionLink("加入购物车", "AddToCart", "Cart", new { GoodsId = 3, Amount = 10 }, ajaxOption, new { @class = "btn" })

这里的提交参数GoodsId及Amount值是可确定的。

Ajax.BeginForm使用在提交参数可能变化的场所,比如参数的值是用户选择的。如:

@using (Ajax.BeginForm("AddToCart", "Cart", ajaxOption))
            {

                 <input name="GoodsId" id="GoodsId" value="@Model.Goods.First().Id" type="hidden">

                 <input name="Amount" id="Amount" value="1" type="text">

                 <input id="addtocart" class="btn" type="submit" value="加入购物车" />

             }