Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all, I am using Html.ActionLink in my view and calling action in a surface controller
here is my actionlink
@Html.ActionLink("htmlAL view", "EditUser", "ListUsersController", new { contactid = @item.contactid, viewonly = true }, new { title = "View User" })
and here is my Controller method
public ActionResult EditUser(string contactid, bool viewonly) { ContactModel c = new ContactModel(); c.contactid = contactid; c.editmode = !viewonly; TempData["test"] = "call partial view"; return PartialView("~/Views/Partials/SiteUser.cshtml", c); }
but noting happenes other than page refresh.
What is the name of the class that your controller is in?
If it is "ListUsersSurfaceController", you would change "ListUsersController" to "ListUsersSurface".
If it is "ListUsersController", you would change it to "ListUsers"
You should not include the work controller in the action link
Really I always get confused with these names.... Yes controller name need to be ListUsers ...thank you very much John
Fullname is ListUsersController
but this load partial view without master page layouts , i have lost the site layout.
If I use AjaxActionLink I can load partial viewwith in layout.
@Ajax.ActionLink("AjaxAL", "ViewSiteUserAjax", "ListUsers", new { contactid = @item.contactid, viewonly = true }, new AjaxOptions { UpdateTargetId = "mylistcontent", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" }, new { title = "View User" })
Do you know why I loose layout while using Html.ActionLink ?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Html.ActionLink to call Surfacecontroller action
Hi all, I am using Html.ActionLink in my view and calling action in a surface controller
here is my actionlink
and here is my Controller method
but noting happenes other than page refresh.
What is the name of the class that your controller is in?
If it is "ListUsersSurfaceController", you would change "ListUsersController" to "ListUsersSurface".
If it is "ListUsersController", you would change it to "ListUsers"
You should not include the work controller in the action link
Really I always get confused with these names.... Yes controller name need to be ListUsers ...thank you very much John
Fullname is ListUsersController
but this load partial view without master page layouts , i have lost the site layout.
If I use AjaxActionLink I can load partial viewwith in layout.
Do you know why I loose layout while using Html.ActionLink ?
is working on a reply...