-One is drawing List Box to select record-"SelectionVer1.cshtml"
-2nd is drawing HTML Table with checkbox to select a record- "SelectionVer2.cshtml"
(Both are using same model and same action method of a controller)
Now I need to dynamically render this based on the logged in User. If user have roll1 then SelectionVer2.cshtml will be rendered by same controller otherwise SelectionVer1.cshtml will be rendered by same controller.
How this can be achieved?
AnilKr
Marked as answer by akfkmupiwu on Apr 12, 2012 12:50 PM
akfkmupiwu
Member
114 Points
63 Posts
Rendering views dynamically
Apr 12, 2012 10:47 AM|LINK
I have two views
-One is drawing List Box to select record-"SelectionVer1.cshtml"
-2nd is drawing HTML Table with checkbox to select a record- "SelectionVer2.cshtml"
(Both are using same model and same action method of a controller)
Now I need to dynamically render this based on the logged in User. If user have roll1 then SelectionVer2.cshtml will be rendered by same controller otherwise SelectionVer1.cshtml will be rendered by same controller.
How this can be achieved?