I am trying to perform edit in the Bootstrap Modal. I have a anchor tag
<a href="@Url.Action("EditProductCategory")" data-toggle="modal" data-target="#myModal">
First time when i click it it goes to the Action Method and works fine
public ActionResult EditProductCategory(string tempData)
{
if (Request.IsAjaxRequest())
{
CategoryModel model = new CategoryModel { CategoryName = "Temp", Description = "Hello Temp" };
return PartialView("_EditCategory",model);
}
return View();
}
But when i close the Modal and then click the link again it does not go to the action method rather it just open the Modal. I know it has something to do with PreventDefault() method. But i am new to Jquery so i cannot understand how could i make it work.
how can i make the link as it should go to the action and open the model every time i click on it