Monday, April 7, 2008

Using ajax we can place any control inside AJAX Update panel and by raising events we can get the data from server without posting whole page. Suppose a textbox is placed in an AJAX Update panel with Autopost back property = true and having textchanged event. then when text is changed textChanged event is raised and if any logic is written that will be processed and only that control is rendered but not the whole page..

Only thing to be noticed is that in Triggers tag we cant give client side events like OnKeyPress.
But when some data to be fetched on key press we need to call RaiseCallBackEvent to call server side code having placed TextBox inside Update panel. this way server side code is executed which binds the grid. That grid and Textbox both should be inside panel.

No comments: