public ActionResult List(string searchKey, int?page) { WebView.WebService._base myWebService; myWebService = new WebService._base(); WebService._base.OSPANDMaintenance ANDMain = new WebService._base.OSPANDMaintenance(); if (searchKey != null) { if (searchKey.Equals("")) { ANDMain = myWebService.GetOSPANDMaintenance(0, 100, null); } else { ANDMain = myWebService.GetOSPANDMaintenance(0, 100, searchKey); ViewBag.searchKey = searchKey; } } else { ANDMain = myWebService.GetOSPANDMaintenance(0, 100, null); ViewBag.searchKey = ""; } ViewData["data7"] = ANDMain.ANDMaintenanceList; string input = "\\\\adsvr"; //string input = "\\\\server\\d$\\x\\y\\z\\AAA"; string output = String.Format("http:{0}", input.Replace("\\d$\\x\\y", String.Empty).Replace("\\", "/")); ViewBag.output = output; //return View(); int pageSize = 10; int pageNumber = (page ?? 1); return(View(ANDMain.ANDMaintenanceList.ToPagedList(pageNumber, pageSize))); }