Shortcut to the ASP.NET Response object.

Allows easy access to the ASP.NET Response object to allow formatting of the response. Note that CallbackHandler will set default content types and encoding for a request which can be overridden in your code if necessary.

[CallbackMethod(RouteUrl="stocks/{symbol}")] public StockQuote GetStockQuote(string symbol) { Response.Cache.SetExpires(DateTime.UtcNow.Add(new TimeSpan(0, 2, 0))); StockServer server = new StockServer(); return server.GetStockQuote(symbol); }