i am trying pass string array(that has two values) from a controller action to another another action. But second Action just have this value : 'System.String[]'
It passes values from view to controller action.But when i try to pass another it just pass empty string.
Html(Razor)
@using (Html.BeginForm("AnnouncementCreate", "Administrator", FormMethod.Post, new { id = "form" }))
{
//There are another html elements....
<label class="checkbox-inline">
<input type="checkbox" name="tags" id="web" value="web" checked="checked" />
<span>Web</span>
</label>
<label class="checkbox-inline ">
<input type="checkbox" name="tags" id="ambulance" value="client" checked="checked" />
<span>Ambulance Client</span>
</label>
Controller:
public ActionResult AnnouncementCreate(NewsItem NEWS, Guid RSSCATEGORY,Guid NEWSIMAGETYPE,string[] tags)
//tags variable have two values: [0]:web , [1]:client
{
....
//I want to Pass current string[] values to another Action
return RedirectToAction(actionName: "Announcements", routeValues: new { tags = tags });
}
//2nd action method
public ActionResult Announcements(string[] tags)
{
//tags variable has this value: [0]: System.String[]
}