您好,欢迎访问一九零五行业门户网

使用MVC框架中要注意的问题(四):ActionLink只是执行Get的操作

actionlink是产生一个链接字符串,它仅仅支持get的action 下载中心(model != null ){(html.beginform()){下载列表通过付费购买某些照片,我们会为你打包下载。你可以在浏览图片的时候,将它们添加到下载框标题编号操作(var item in model){ = html.encode(it
actionlink是产生一个链接字符串,网站空间,虚拟主机,它仅仅支持get的action 下载中心(model != null){(html.beginform()){下载列表通过付费购买某些照片,我们会为你打包下载。你可以在浏览图片的时候,服务器空间,将它们添加到下载框标题编号操作(var item in model){ = html.encode(item.title)= html.encode(item.path)= html.actionlink(删除, deletefromdownloadlist, new { id = item.path })%> } }%>}else{%>对不起,你目前没有任何下载的列表}   controller中的代码 [authorize]public actionresult deletefromdownloadlist(string id) {string profilekey = downloadlist;profilebase profile = profilebase.create(user.identity.name);models.downloadlist list = profile.getpropertyvalue(profilekey) as models.downloadlist;if (list != null && list.items != null){list.items.remove(list.items.firstordefault(i => i.path.equals(id)));profile.save();}return redirecttoaction(download);}
其它类似信息

推荐信息