This question is locked. New answers and comments are not allowed.
It looks like the LoadContentFrom method is encoding the URL when using more that 1 parameter (instead of encoding the parameter value(s) only).
I have a tabstrip within a ViewUserControl (that gets rendered as a PartialView).
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="System.Web.Routing" %>
<%
Guid OrganizationId = new Guid(ViewData["OrganizationId"].ToString());
Guid OrganizationUnitId = new Guid(ViewData["OrganizationalUnitId"].ToString());
Response.Write("<div class=\"RowDetailsContainer\" style=\"text-align: left;\">");
Html.Telerik().TabStrip()
.Name("Tab" + OrganizationId.ToString())
.Items(parent =>
{
parent.Add()
.Text("Unit Staff " + Url.Action("SummaryPersonMember", "OrganizationalUnit", new { organizationId = OrganizationId, organizationalUnitId = OrganizationUnitId }).ToString())
.LoadContentFrom("SummaryPersonMember", "OrganizationalUnit", new { organizationId = OrganizationId, organizationalUnitId = OrganizationUnitId })
;
}
)
/*.SelectedIndex(0)*/
.Render();
Response.Write("</div>");
%>
// Notes: OrganizationId and OrganizationUnitId are Guids.
When rendered, the url is rendered as:
http://localhost:8644/OrganizationalUnit/SummaryPersonMember?organizationId=6f898cee-9010-4a52-860c-9d0ef967d05c&organizationalUnitId=2a81d7d4-bd87-4eea-8c48-30f364bb25f2
Note the & between the parameters instead of the &. If this runs, it will cause an error because the method in the controller is expecting 2 params.
I get the same problem if I use the following:
.LoadContentFrom(Url.Action("SummaryPersonMember", "OrganizationalUnit", new { organizationId = OrganizationId, organizationalUnitId = OrganizationUnitId }))
I think I have similar problems in the telerik MVC menu, which I am attempting to get to.
Thanks!
Mike
I have a tabstrip within a ViewUserControl (that gets rendered as a PartialView).
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="System.Web.Routing" %>
<%
Guid OrganizationId = new Guid(ViewData["OrganizationId"].ToString());
Guid OrganizationUnitId = new Guid(ViewData["OrganizationalUnitId"].ToString());
Response.Write("<div class=\"RowDetailsContainer\" style=\"text-align: left;\">");
Html.Telerik().TabStrip()
.Name("Tab" + OrganizationId.ToString())
.Items(parent =>
{
parent.Add()
.Text("Unit Staff " + Url.Action("SummaryPersonMember", "OrganizationalUnit", new { organizationId = OrganizationId, organizationalUnitId = OrganizationUnitId }).ToString())
.LoadContentFrom("SummaryPersonMember", "OrganizationalUnit", new { organizationId = OrganizationId, organizationalUnitId = OrganizationUnitId })
;
}
)
/*.SelectedIndex(0)*/
.Render();
Response.Write("</div>");
%>
// Notes: OrganizationId and OrganizationUnitId are Guids.
When rendered, the url is rendered as:
http://localhost:8644/OrganizationalUnit/SummaryPersonMember?organizationId=6f898cee-9010-4a52-860c-9d0ef967d05c&organizationalUnitId=2a81d7d4-bd87-4eea-8c48-30f364bb25f2
Note the & between the parameters instead of the &. If this runs, it will cause an error because the method in the controller is expecting 2 params.
I get the same problem if I use the following:
.LoadContentFrom(Url.Action("SummaryPersonMember", "OrganizationalUnit", new { organizationId = OrganizationId, organizationalUnitId = OrganizationUnitId }))
I think I have similar problems in the telerik MVC menu, which I am attempting to get to.
Thanks!
Mike