public ActionResult Trassa() { if (StaticObjects.totrace && StaticObjects.trassa != null) { foreach (var element in StaticObjects.trassa.Elements()) { try { if (element.Name == "portrait") { XAttribute id_att = element.Attribute("id"); if (id_att == null) continue; Models.PortraitModel pmodel = new Models.PortraitModel(id_att.Value); } else if (element.Name == "search") { XAttribute ss_att = element.Attribute("ss"); if (ss_att == null) continue; var model = new Turgunda2.Models.SearchModel(ss_att.Value, null); } } catch (Exception) { } } } return RedirectToAction("Index", "Home"); }
public ActionResult Search(string searchstring, string type) { string t = string.IsNullOrEmpty(type) ? null : type; var model = new Turgunda2.Models.SearchModel(searchstring, t); return View(model); }