Greetings, I have an asp.net mvc application. I have some links that corresponds to clients names. When user clicks on this link I would like to show an information of clicked client and additionally a textarea where user shall be able to write some text (comment) about selected client. How can I achieve it?
EDIT I've made something like:
<%=Html.ActionLink(operatorWhoAnswered.Operator.FirstName, "ShowSingleConverstationWithAnswerForm", "MyMessages", new { id = operatorWhoAnswered.Operator.ROWGUID }, new AjaxOptions() { UpdateTargetId = "ss" }) %>
and my controller action looks as follows:
public PartialViewResult ShowSingleConverstationWithAnswerForm(string id)
{
SingleConversationWithAnswerFormViewModel vm = new SingleConversationWithAnswerFormViewModel();
PartialViewResult viewResult = new PartialViewResult();
viewResult.ViewName = "SingleConverstationWithAnswerForm";
viewResult.ViewData = new ViewDataDictionary(vm);
return viewResult;
}
but view opens in a new page, instead of div with id="ss"
EDIT2 Solution found! I don't know why I have used Html.ActionLink. Ajax.ActionLink works fine!