TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Deepika Chaudhary
1.6k
136
98k
MVC Actionlink with (RouteValueDictionary)ViewBag.GridState
Jul 26 2013 6:59 AM
Hi,
I have an mvc application with telerik grid.
Inside telerik gird i have one column template field where i want to use actionlink.
In the action link I want to pass (RouteValueDictionary)ViewBag.GridState and confirm message dialog.
How can i do this?
It is giving error if i am using it with (RouteValueDictionary)ViewBag.GridState
Instead of new { onclick = "return confirm('Are you sure?');" }) if i pass null then it works but i want confirm dialog before it go to control action method.
This is the code what i am trying.
columns.Template(
@<text>
@{ ViewBag.GridState["id"] = @item.BATCHID;
ViewBag.GridState["CurrentView"] = "Index";
ViewBag.GridState["fromPeriod"] = Model.FromPeriod;
ViewBag.GridState["toPeriod"] = Model.ToPeriod;
}
@Html.ActionLink("Set Poster", "SetPosterBy","Batch",(RouteValueDictionary)ViewBag.GridState, new { onclick = "return confirm('Are you sure?');" })
</text>
).Width(200).Title("SET POSTED/CLOSED/QAED BY");
Please help.
Reply
Answers (
5
)
How to use DalaList in MVC Razor
Need tool to test XSS vulnerability