public static Asset GetAsset(string num) { //barcode was scanned or manually inputted num = ParseScanInput(num); SQL_Request req = new SQL_Request().OpenConnection(); req.GetData(num); if (req.Tag is Asset) { (req.Tag as Asset).Images = (req.Tag as Asset).Images.Replace(",,,", "<@#$>").Replace(",", "").Replace("<@#$>", ",").Replace("Images", "").Replace("\\", ""); HttpContext.Current.Session["CurrentAsset"] = req.Tag as Asset; return(req.Tag as Asset); } else { return(new Asset()); } }