摘要:        
1: ViewData传值方式ViewData的生命周期和View相同, 只对当前View有效. ViewData["zd"] = dfdfd2:TempData传值方式 可以跨Action传递 TempData的数据至多只能经过一次Controller传递, 并且每个元素至多只能被访问一次, 例如一个用法为,抛出一个异常。跳转到error页面public ActionResult Index3(){ TempData["tempIndex"] = "出错了!"; Response.Redirect("/home/error    阅读全文
posted @ 2012-11-06 14:03
Raywang80s
阅读(769)
评论(0)
推荐(0)
        
 
                     
                    
                 
                    
                 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号