protected void Page_Load(object sender, EventArgs e) { int userID = -1; int channelID; Helper.TryGetUserID(Session, out userID); if (Request.Params["channelID"] == null) { Response.Redirect("~/AllChannels.aspx"); } if (!int.TryParse(Request.Params["channelID"], out channelID)) { Response.Redirect("~/AllChannels.aspx"); } BLClient client = null; try { client = new BLClient(); _channel = client.GetChannelDetailsFull(userID, channelID); } finally { client.Dispose(); } if (Request.QueryString["a"] == null) { var installerSetup = new InstallerSetup(); installerSetup.Add((int)_channel.ChannelID, _channel.ChannelGUID, _channel.ChannelName, 10); Response.RedirectPermanent(Url.For(installerSetup), true); } ChannelName1.Text = _channel.ChannelName; ChannelName2.Text = _channel.ChannelName; ChannelName3.Text = _channel.ChannelName; PublisherName.Text = _channel.PublisherDisplayName; NoContents.Text = _channel.NoContents.ToString(); ShortDescription.Text = string.IsNullOrEmpty(_channel.ChannelDescription) ? "No description available" : _channel.ChannelDescription; LongDescription.Text = string.IsNullOrEmpty(_channel.ChannelLongDescription) ? "<p>No description available</p>" : "<p>" + Helper.FirstWords(_channel.ChannelLongDescription, 120).Replace("\r\n", "</p><p>") + "</p>"; NoFollowers.Text = _channel.NoFollowers.ToString(); AddDate.Text = _channel.AddDate.ToShortDateString(); ContentLastAddedDate.Text = _channel.ContentLastAddedDate.ToShortDateString(); PreviewLiteral.Visible = _channel.PrivacyStatus != ChannelPrivacyStatus.Locked; _noSlides = _channel.Slides.Count; addStreamLink.NavigateUrl = "~/Download.aspx?channelID=" + channelID + "_strm"; ChannelSlides.DataSource = _channel.Slides; ChannelSlides.DataBind(); }