down votefavorite | i get error in anchor tag where i call controller(blog),actionname(index). I want my url looks likehttp://localhost:1882/blog/travels/1. Here travels is the name of parent and 1 is child id |
This is my .xslt page:
select="Parent"> class="grid-col-3">
href='@Url.Action("Index","Blog", new{{@ParentName}/{current()/@Id}}'> select="@ParentName"> select="/BlogCategories/BlogCategory[@ParentID = current()/@Id]"> class="lis"> href="{@Name}/{current()/@ID}"> select="@Name"> i want to call this blog controller
public ActionResult addblogxml(string actiontype) { if(actiontype== "Submit") { var blog = _api.GetAllBlogCategory().ToList(); StreamWriter writer = new StreamWriter(Server.MapPath("~/XmlFiles/BlogCategory.xml")); writer.WriteLine(@"xml version=""1.0"" encoding=""utf-8""?>"); writer.WriteLine(blog[0]); writer.Close(); var xDocument = XDocument.Load(Server.MapPath("~/XmlFiles/BlogCategory.xml")); string xml = xDocument.ToString(); ViewBag.BlogCategoryXML = xml; } return View("~/Areas/BMS/Views/CategoryBlog/addblogxml.cshtml"); }
Bhushan GawalePosted Aug 1, 2016, 5:48 AM