Click here to Skip to main content
16,016,394 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, Problem I am facing is that when controller is called using href script for the page is loaded fine but if I load it using Html.ActionLink page doesn't loads script until I refresh the page.



Html.ActionLink("Add Info", "DriverDtlAdd", new { id = Order.ID })

C#
[HttpGet]
         public ActionResult DriverDtlAdd(int id = -1)
         {
             if (Session["Driver"] != null)
             {
                 List<DriverDtl> driverDtls = new DriverDtlDAL().GetDriverDtls(id);

                 DriverDtl obj;
                 if (driverDtls.Count > 0)
                 {
                     obj = driverDtls[0];
                 }
                 else
                 {
                     obj = new DriverDtl();
                 }
                 return View(obj);
             }
             else
             {
                 return RedirectToAction("DriverLogin");
             }
         }
Posted
Comments
Dhanamanikandan 15-Oct-12 3:35am    
Share ur script code plz

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900