If the data doesn't change then js on the page is a better option because you don't have to make another call with latency.
On Thu, Jul 11, 2013 at 11:34 AM, David Smith <[email protected]> wrote: > jQuery, WebAPI and KnockoutJS**** > > ** ** > > ** ** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Shane Nall > *Sent:* Thursday, 11 July 2013 1:31 p.m. > *To:* ozDotNet > *Subject:* Re: Server-side data to JavaScript**** > > ** ** > > Hi Greg, **** > > ** ** > > WebAPI and Handlebars.**** > > ** ** > > Cheers, **** > > Shane**** > > ** ** > > ** ** > > ** ** > > ** ** > > ** ** > > On 11/07/2013, at 10:57 AM, Greg Keogh <[email protected]> wrote:**** > > > > **** > > Folks, on Tuesday I managed to use jQuery 1.10 in a static html page to > simulate an interactive product picker. As you fiddled controls the price > would adjust accordingly. My price calculation data was just hard-coded > into the page, so when this becomes part of the real > ASP.NET<http://asp.net/>app it will have to get the price data from a > database. I can only think of > two ways of getting real data into the page for the JavaScript to use in > the calculations:**** > > **** > > 1. The values will be "rendered" into JavaScript variables in the page.*** > * > > 2. The app will call a web service to get the values (Ajax?)**** > > **** > > What would others do in this situation?**** > > **** > > Greg K**** > > ** ** >
