Click here to Skip to main content
12,349,778 members (25,320 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: MVC
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 })

[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 3-Oct-12 22:10pm
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 4 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100