File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Web ;
5
+
6
+ namespace CouchbaseAspNetSample . Constants
7
+ {
8
+ public static class ViewDataConstants
9
+ {
10
+ public const string MESSAGE = "Message" ;
11
+ }
12
+ }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class HomeController : Controller
14
14
15
15
public ActionResult Index ( )
16
16
{
17
- Session [ SessionConstants . MESSAGE ] = "Hello, Couchbase ASP.NET!" ;
17
+ ViewData [ ViewDataConstants . MESSAGE ] = "Hello, Couchbase ASP.NET!" ;
18
18
19
19
return View ( ) ;
20
20
}
Original file line number Diff line number Diff line change 2
2
ViewBag .Title = " Home Page" ;
3
3
}
4
4
5
- <h2 >@Session [CouchbaseAspNetSample.Constants.SessionConstants.MESSAGE] </h2 >
5
+ <h2 >@ViewBag.Message </h2 >
6
6
<p >
7
7
To learn more about Couchbase and .NET visit
8
8
<a href =" http://couchbase.com/develop/net/current" title =" Couchbase .NET Client Library Documentation" >http://couchbase.com/develop/net/current</a >.
You can’t perform that action at this time.
0 commit comments