protected void SearchResultsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { Data.Stop stop = e.Item.DataItem as Data.Stop; HyperLink link = e.Item.FindControl("StopHyperLink") as HyperLink; link.Text = stop.Name; link.NavigateUrl = "~/Views/Stops/Stop?id=" + stop.Id; }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } if (string.IsNullOrEmpty(Id)) { Response.Redirect(UrlHelper.ERROR_PAGE); return; } Data.Stop stop = Api.GetStop(Id); if (stop == null) { Response.Redirect(UrlHelper.ERROR_PAGE); return; } NameLiteral.Text = stop.Name; }