I have a page with 100 products. When the product is clicked, I add the product info to the cart with session.
I'm sending the id of the product to the session with the querystring.
response.redirect("shop.aspx?id=2")
When the user clicks on the product, my page is refreshed because it sends a querystring to the page and the page position goes to the top.
MaintainScrollPositionOnPostback="true"
not work for me cause i use response.redirect();
thats my problem. Thanks all =(
I explain the solution.
if u guys using ' html a tag or Response.Redirect() ' Delete all.
use PostBackUrl
At the top of your .aspx codefile, insert the following:
Like this
Thats all
<asp:Button ID="Button1" PostBackUrl="WebForm1.aspx?id=<%#Eval(id)%>" runat="server" Text="Submit" />
I wish you good work