----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: Swapnil_B1 Message 1 in Discussion New Client Side Script Features in ASP.NET 2.0 ASP.NET 2.0 includes a number of features that rely on client-side script in the browser. For example, the OnClientClick property of Button control allows you to programmatically run client-side script when the Button is clicked. The Button renders the client-side onClick attribute along with the button's own javascript. There are cases where an application requires the position of the page in the browser to remain after post-back to the server. For example, if data entry causes post-back in a large page, the end-user would be required to scroll the page to the position that they were editing at in order to continue. Page developers can simply mark their form to maintain scroll position by setting the MaintainScrollPositionOnPostBack property to true in the @Page directive or by setting this in Web.config to apply to all pages in an application. An exciting new feature for controls are Client-side CallBacks, which allow a control to execute an out-of-band request back to the server to obtain additional data, without posting the entire page. This feature relies on browser support for callback handling (usually through XMLHTTP), as specified by the SupportsCLientCallBack property in browser capabilities. The TreeView control takes advantage of this feature to enable populating tree nodes on-demand when a parent node is expanded on the client. GridView and DetailsView also take advantage of this feature to implement paging and sorting when EnableSortingAndPagingCallbacks is set to true. A control registers itself as being able to receive callback events by implementing the IcallBackEventHandler interface. This interface allows the page to invoke registered delegates for returning callback data to the client. There are two methods of the ICallBackHandler interface, RaiseCAllBackEvent and GetcallBackEventResult. RaiseCallbackEvent accepts an argument for context (args passed from the client), which can be used to process the event. GetCallbackResult returns a String that represents the data to return to the client. The reason this interface is separated into two methods is to allow for asynchronous processing, for example to retrieve data from a data source control. The control then registers a client-side callback function that knows how to create the arguments to pass to the server-side delegate, and an error handling function to be invoked when an error in callback processing occurs. Finally, the control emits references to callback events using Page.CLientScript.GetCallbackeventReference. Swapnil (Swaps) http://swapsnet.spaces.live.com/ ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
