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

推荐订阅源

Engineering at Meta
Engineering at Meta
G
GRAHAM CLULEY
Attack and Defense Labs
Attack and Defense Labs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
T
Threat Research - Cisco Blogs
阮一峰的网络日志
阮一峰的网络日志
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
Google DeepMind News
Google DeepMind News
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
C
CXSECURITY Database RSS Feed - CXSecurity.com
量子位
T
The Blog of Author Tim Ferriss
Project Zero
Project Zero
Webroot Blog
Webroot Blog
雷峰网
雷峰网
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
About on SuperTechFans
NISL@THU
NISL@THU
AWS News Blog
AWS News Blog
Security Latest
Security Latest
S
Schneier on Security
W
WeLiveSecurity
K
Kaspersky official blog
有赞技术团队
有赞技术团队
Cyberwarzone
Cyberwarzone
P
Palo Alto Networks Blog
TaoSecurity Blog
TaoSecurity Blog
G
Google Developers Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Schneier on Security
Schneier on Security
博客园_首页
博客园 - 司徒正美
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Check Point Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Know Your Adversary
Know Your Adversary
P
Privacy & Cybersecurity Law Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - 王继坤

DataTable 递归 简单的程序,来实现无限级列表 结合 jquery.table.js 实现 asp.net mvc 2 简简单单做开发 使用DataContext扩展方法Find<TEntity>(TEntity obj) 遇到的问题 asp.net mvc 2 简简单单做开发 实现基本数据操作操作RepositoryController<T> asp.net mvc 2 简简单单做开发 自定义Controller基类 - 王继坤 asp.net mvc 2 简简单单做开发 自定义DropdownList控件 asp.net mvc 2 简简单单做开发 通用增删改基本操作通用页面 asp.net mvc 2 DisplayTemplates 的使用 FcDigg 源码 asp.net 3.5 linq to sql 扩展方法 linq to access 简单实现 实例demo linq to access 简单实现 asp.net mvc 随想 asp.net ajax fccms 小型简单个人blog源码 FCKEDITOR中文使用说明 js调用 dotfuscator.exe 采用线程生成静态页面 新的开始--- gridview 实现多字段综合查询
asp.net mvc ajax实现1
王继坤 · 2009-03-18 · via 博客园 - 王继坤

经过一天的练习,asp.net mvc 的ajax实现起来比jquery 实现起来还简单,这里的简单是不用写过多的代码。使用ajax.beginform(),ajax.linkaction(),就可以简单实现,不过未来实现不是太乱,用了dialog.js,弹出一个简单的层,来实现添加,更新。使用到的action ,index,list,create(页面),create(添加),edit(页面),edit(编辑),delete.对应的页面及控件,index.aspx,list.ascx,create.ascx,edit.ascx。页面可以根据脚手架自动的建立,不用写太多的代码。代码的还和以前的一样,只不过是在调用的时候有些改变。

主要知识点:

ajax.bengform(),ajax.linkaction()的使用,报考的参数:
UpdateTargetId="list" 调用的结果放在list里面。
OnSuccess=“对待" 执行成功调用的js函数 还想不能加参数。
HttpMethod=“post” method 的方式。
InsertionMode=InsertionMode.InsertAfter 添加到后面,还有两种 InsertBefore,Replace(默认)
url=“” 还不太清楚具体的用法。可以把url值的内容放到更新对象里面。
LoadingElementId=“” 正在调用缓冲的时候显示的内容。
OnBegin=“”,OnComplete=“”,OnFailure=“” 这些容易里面。

代码如下:

index

Code

list.ascx

Code

create.ascx

Code

edit.ascx

Code