Hi Everybody,
I've been crunching on an issue with a cart module i'm trying to create tailored to our wishes. How should it work:
Arbitrary product page (in our case XMOD) should show products.
An add-to-cart link should put the products in a cart.
Then you have the view/update cart
...etc.
First i crated the cart module than in the first try i created an addtocart.aspx page iheriting from the wystem.web.ui.page. This however would result in not really enjoying the DNN functionality. It DID work however. So i stepped over to a addtocart usercontrol under the same namespace and got it working! Now i want to be able to test the cart more extensively and seeing as i do not have XMOD in my development environment i wanted to create an AJAX call to this control (something like the url the cart resides on but then the .../ctrl/AddToCart/etc... to acces it. This works if put into the browser manually. I know want to add it to my viewcart.ascx but am not able to find out how to call an OTHER control and get the response back with AJAX in DNN. I've developed quite a bit of AJAX applications and understand the principals very well but can not see any DNN examples that do NOT involve asmx files or call to the same pagebehind. THe reason i really want the client to call the control through ajax is that i can mimic the way XMOD works (within an XMOD template you can define the page you want to call and capture the responsetext or responsexml and process that. The second reason i want this is because i might want to place some of the cuntionality of the cart in a seperate control to have it grouped an use ajax around the module to call this controll.
Is there anyone out there who can give me an example in which i can call a different control (may also be an example posting top the same pagebehind that uses loadcontroll) and have that controll, though being an entire DNN page, return a message like "| Added to cart" which i can popup or write to some updatepanel?
I wopuld be REALLY thankfull seing i have already sp[ent a good 6 hours googling this.
Thanks in Advance,
Alexander