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

推荐订阅源

N
Netflix TechBlog - Medium
S
Secure Thoughts
aimingoo的专栏
aimingoo的专栏
量子位
F
Full Disclosure
云风的 BLOG
云风的 BLOG
D
Docker
Stack Overflow Blog
Stack Overflow Blog
Last Week in AI
Last Week in AI
Security Latest
Security Latest
Project Zero
Project Zero
Cyberwarzone
Cyberwarzone
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
T
Threat Research - Cisco Blogs
The Hacker News
The Hacker News
The Register - Security
The Register - Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
MyScale Blog
MyScale Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Privacy & Cybersecurity Law Blog
V
Visual Studio Blog
A
Arctic Wolf
L
LINUX DO - 热门话题
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
Recorded Future
Recorded Future
K
Kaspersky official blog
L
Lohrmann on Cybersecurity
V
V2EX
Recent Announcements
Recent Announcements
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Securelist
S
Security Affairs
Forbes - Security
Forbes - Security
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
C
Cisco Blogs
AI
AI
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Scott Helme
Scott Helme
Spread Privacy
Spread Privacy

博客园 - 王继坤

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