[RESOLVED]Dynamic property of viewbag in mvc

How to define a dynamic property and access it with the help of viewbag in mvc?

Can anybody help on this.

1. To add

ViewData.Add("MyMessage", MyError)

2. To Access in View

@ViewBag.MyMessage

Leave a Reply