the web service should supply a method that returns the desired javascript.
the web application can just call the web service, then emit the returned
javascript. this could be implemented as a user control on the web
application.

you could also write the web service in javascript, and share the business
logic code.

-- bruce (sqlwork.com)


"George Butts" <geobutts@optonline.net> wrote in message
news:d97e0004.0307091210.23d49dd9@posting.google.c om...
> I am architecting an n-tier enterprise web solution. This comprises
> of a Web Application, a Web Service and a database (SQL Server 2000).
> Each of these componenets will potentially reside on their own server
> in a High-Availibilty (HA) configuration. Since there is potential to
> have an extremely high number of concurrent requests, I would like to
> duplicate the business logic on the client-side using JavaScript to
> allow the end-user to model their data before submitting the updates.
> This would greatly reduce the number of requests from the web
> application to the web service and ultimately to the database. I do
> not want to duplicate the development effort for the business logic
> since this could be extremely error-prone. I would like to keep all
> the business logic in its respective layer within the web service, but
> allow the web service to "emit" it's JavaScript equivalent to be
> written to the web page that will be served to the end-user. I am
> fairly new to ASP.NET. I know that web controls provide the ability
> to override the Render method and use the HtmlTextWriter object to
> append JavaScript to the web page to handle tasks locally. I was
> wondering if it would be possible for a web service to perform a
> similar task. If not, does anyone have any experience with this type
> of problem that may provide a different/better solution.
>
> Thanks,
> George