"ton" <to*@nospam.nlwrote in message
news:14**************************@cache3.tilbu1.nb .home.nl...
What is the advantage of using these controls, is it really faster, or is
there another way (javascript) to get a small calendar when the date-field
got the focus.
Ajax is superb technology. However, that does not mean that it must be used
for every eventuality...
The calendar example is a good one. I have a JavaScript calendar which I've
used for years. It does everything I require of it, namely to display a
month at a time and to respond to mouse clicks. While the user is scrolling
backwards and forwards through the months there is no roundtrip to the
server at all. When the user chooses a date, I can add the date to a DOM
control or cause a postback if I want to. I can even persuade it to call a
server-side C# function via Ajax. The only time I might want it to retrieve
data from the server is when the client requires more functionality that
this e.g. they might want to display public holidays in a different font or
colour or whatever. Then, the calendar control would need server-side
connectivity, almost certainly through Ajax.
You are correct that Ajax callbacks are not so "heavy" as full postbacks,
but they do still involve a roundtrip to the server.
It's always been my belief that one of the simplest ways to improve a web
application's performance is to minimise the roundtrips to the server.
So, I would say that if it can be done client-side with JavaScript, then do
it client-side with JavaScript. This applies especially to things like
validation - e.g. there is absolutely no requirement whatever to validate
the contents of a numeric-only TextBox server-side...
I'd also advise you to have a serious look at Silverlight - some of the
possibilities with that technology are bordering on the revolutionary...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net