通过本文主要向大家介绍了精通asp.net web api,web程序设计asp.net,vs2010 asp.net web,简述asp.net的web窗体,asp.net等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
Now we'll turn to the client side, and add a page that can consume data from the Admin controller. The page will allow users to create, edit, or delete products, by sending AJAX requests to the controller.
现在我们转入客户端,并添加一个能够使用从Admin控制器而来的数据的页面。通过给控制器发送AJAX请求的方式,该页面将允许用户创建、编辑,或删除产品。
In Solution Explorer, expand the Controllers folder and open the file named HomeController.cs. This file contains an MVC controller. Add a method named Admin:
在“解决方案资源管理器”中,展开Controllers文件夹,并打开名为HomeController.cs的文件。这个文件是一个MVC控制器。添加一个名称为Admin的方法:
打开AdminController.cs文件,并把Authorize注解属性添加到整个AdminControl
现在我们转入客户端,并添加一个能够使用从Admin控制器而来的数据的页面。通过给控制器发送AJAX请求的方式,该页面将允许用户创建、编辑,或删除产品。
In Solution Explorer, expand the Controllers folder and open the file named HomeController.cs. This file contains an MVC controller. Add a method named Admin:
在“解决方案资源管理器”中,展开Controllers文件夹,并打开名为HomeController.cs的文件。这个文件是一个MVC控制器。添加一个名称为Admin的方法:
打开AdminController.cs文件,并把Authorize注解属性添加到整个AdminControl
您可能想查找下面的文章:
- ASP.NET core Web中使用appsettings.json配置文件的方法
- 详解ASP.NET WEB API 之属性路由
- ASP.NET webUploader上传大视频文件相关web.config配置
- asp.net web页面自定义分页控件使用详解
- ASP.NET Web.config配置文件详解
- ASP.NET web.config 配置节点详解
- ASP.NET Web Api 2实现多文件打包并下载文件的实例
- ASP.NET web.config中 数据库连接字符串加密解密
- 在ASP.NET 2.0中操作数据之五十三:在Data Web控件显示二进制数据
- asp.net基于Web Service实现远程上传图片的方法