public ActionResult List(string searchKey, int?page) { WebView.WebService._base myWebService; myWebService = new WebService._base(); WebService._base.OSPMaterialClassMaintenance MatClassM = new WebService._base.OSPMaterialClassMaintenance(); MatClassM = myWebService.GetOSPMaterialClassMaintenance(0, 100000, searchKey); 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; int pageSize = 10; int pageNumber = (page ?? 1); return(View(MatClassM.MatClassMaintenanceList.ToPagedList(pageNumber, pageSize))); }