I’m developing my ASP.NET web app using VS2010,C#. I have a user control contained in my masterpage, and now I’m going to access my usercontrol from the content page, is it possible to change usercontrol via content page client side events? I’m going to prevent any postback
I want to simulate something like this site:
http://www.just-eat.co.uk/restaurants-dialacrate-w13/menu
when my customers click on a food, food should be added to my order basket without any postback, I think it is using a JavaScript, right?
I am talking specific to the URL you gave in your question: If you investigate the code, the basket part in the HTML part is :
Then, in the bundle.js;
So, he is using and asp.net updatepanel to update the basket. Although this is fine, it is not suggested, as in the background, it sends the whole page and returns a lot of data back.. See here to see why..
Also in the Encosia link I’ve provided, you will see one of the ways how this is properly done.
You can either use page methods, web services, plain ajax, or the web api to achieve what you require..