Request.QueryString help needed
Posted: Tue Sep 29, 2009 1:18 pm
I have a conlib on the frontpage which loads products 200 at a time. It uses most of the code from the "featured products" conlib with minor adjustments:
I am having trouble figuring out how to make a link at the bottom of the page with http://_________/?p+1 (ie the next page) in the href field.
wasnt working for me for some reason.
Anyone know how to do this? Maybe Im just not formatting my hyperlink properly. Any advice appreciated.
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
_GlobalDisablePurchase = Token.Instance.Store.Settings.ProductPurchasingDisabled;
if (!string.IsNullOrEmpty(this.Caption)) CaptionLabel.Text = this.Caption;
ProductList.RepeatColumns = this.Columns;
pager=AlwaysConvert.ToInt(Request.QueryString["p"]);////////////////////
ProductList.DataSource = ProductDataSource.LoadForStore(200,200* pager);//////////////////////
ProductList.DataBind();
}
Code: Select all
<asp:HyperLink ID="nextlink" runat="server" NavigateUrl='<%# getnextpageurl()%>'>Next</asp:HyperLink>
Anyone know how to do this? Maybe Im just not formatting my hyperlink properly. Any advice appreciated.