protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string TypeName = Request.QueryString["TypeName"]; if (Request.QueryString["id"] != null) { id = Request.QueryString["id"]; DataTable dt = GetRepHome(TypeName); RepHome.DataSource = dt; RepHome.DataBind(); RepTitle.DataSource = dt; RepTitle.DataBind(); RepCount.DataSource = dt; RepCount.DataBind(); } if (Request.QueryString["SiteId"] != null) { SiteId = Request.QueryString["SiteId"]; DataTable dt = GetSiteAffiches(); RepTitle.DataSource = dt; RepTitle.DataBind(); RepHome.DataSource = dt; RepHome.DataBind(); RepCount.DataSource = dt; RepCount.DataBind(); } NewsBind(); } }
protected void Page_Load(object sender, EventArgs e) { try { var book = new TafsirLib.BookName(); var bookId = 0; bookId = Convert.ToInt32(Request.QueryString["id"]); var titleid = 0; titleid = Convert.ToInt32(Request.QueryString["tid"]); var bookEntity = book.Get(bookId); txtBookName.InnerText = bookEntity.BookName; txtWriter.InnerText = bookEntity.Writer + ' ' + bookEntity.Translator; RepTitle.DataSource = new TafsirLib.BookParagraph().Load(bookId); RepTitle.DataBind(); RepText.DataSource = titleid <= 0 ? new TafsirLib.BookParagraph().GetFirst(bookId) : new TafsirLib.BookParagraph().Get(titleid); RepText.DataBind(); } catch (Exception ex) { var t = ex.Message; } }