about add to cart button on homepage

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
hello there........this is faisal..
i need an add to cart button on the homepage products page.. i have copied productbox1 "Add to cart" button and a code as well to home page products........the id of button remains same.....bt at run time when i click on "Add to cart" button it gives me an error that is---------

---------------------------------------------------------------------------------------------

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.


-------------------------------------------------------------------------------------------

please do needful by replying to this problem soon..


hello there again.........

Add to cart button is working on local host but when i upload the ascx page and also the code file with the "Add to cart " button it gives me an error------

ASP.modules_homepageproducts_ascx' does not contain a definition for 'btnAddToCart_Click' and no extension method 'btnAddToCart_Click' accepting a first argument of type 'ASP.modules_homepageproducts_ascx' could be found (are you missing a using directive or an assembly reference?)

Again i m telling you Add to cart button works fine on local server bt not working on webserver..... i have uploaded it from FIREFTP... The link to my project is---

http://justlinen-com.si-cloud.com........

please do needful on ergent basis....
13 years ago
You need to change your page load event to:


            if (!Page.IsPostBack)
                BindData();
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.