using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;
using System.Windows.Forms;
namespace _3._2._8使用Action返回值.Controllers
{
public class ActionResultController : Controller
{
// GET: ActionResult
public ActionResult Index()
{
return View();
}
public ActionResult Json()//返回一个JsonResult格式数据
{
var book = new { BookId = 1, BookName = "MVC框架", Author = "何腾飞", PublishDate = DateTime.Now };
return Json(book,JsonRequestBehavior.AllowGet);
}
public ActionResult JavaScript()//返回一个JavaScriptResult格式数据
{
string js = "alert('弹出一个窗口')";
return JavaScript(j
最后
以上就是漂亮爆米花最近收集整理的关于c# 带返回值的action_C#使用Action方法六种返回值的全部内容,更多相关c#内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复