pbabcock
Aug 17th, 2005, 11:21 AM
Hi all..
I have a repeater that is bound to an xml string containing shopping cart contents (results from a SQL query.) Inside the repeater, the various cart items are displayed along with delete button for each. All of this is shown using the standard repeater itemtemplates, etc. The problem I am having is with responding to the events when someone clicks on the "delete" button.
My situation, as I see it:
- I need to rebind the shopping cart repeater on every page because the shopping cart contents often change and I need it to reflect this. The page is full of "add to cart" buttons, and when one is clicked the shopping cart contents are changed.
- I can not limit my shopping cart repeater to rebind when IsPostBack=False, because the add to cart buttons cause a post back that could change the cart contents, meaning that I need to rebind even when the page IS a post back.
- Since I need to rebind all the time, I have disabled viewstate for the repeater.
- Because I have disabled viewstate, I can not react to any events for the repeater. Therefore I never receive any events when the delete button inside the repeater, is clicked, and I can not find another way to know when this is happening.
How do I get around this?? Am I doing this wrong?
ANY advice is appreciated!
I have a repeater that is bound to an xml string containing shopping cart contents (results from a SQL query.) Inside the repeater, the various cart items are displayed along with delete button for each. All of this is shown using the standard repeater itemtemplates, etc. The problem I am having is with responding to the events when someone clicks on the "delete" button.
My situation, as I see it:
- I need to rebind the shopping cart repeater on every page because the shopping cart contents often change and I need it to reflect this. The page is full of "add to cart" buttons, and when one is clicked the shopping cart contents are changed.
- I can not limit my shopping cart repeater to rebind when IsPostBack=False, because the add to cart buttons cause a post back that could change the cart contents, meaning that I need to rebind even when the page IS a post back.
- Since I need to rebind all the time, I have disabled viewstate for the repeater.
- Because I have disabled viewstate, I can not react to any events for the repeater. Therefore I never receive any events when the delete button inside the repeater, is clicked, and I can not find another way to know when this is happening.
How do I get around this?? Am I doing this wrong?
ANY advice is appreciated!