Is there any way to return开发者_JAVA技巧 object from Session when Select is called on ObjectDataSource? Specifically, I have Products object and saved in Session. Now on another page I have ObjectDataSource which will call same bussiness object method to get Products object. Here I want to hook up any event like Selecting and I would like to return Products object from Session to Select method of ObjectDataSource.
Is this possible?
You have to define the method as static and access the Session inside the method using HttpContext.Current.Session["products"].
ObjectDataSource has property EnableCaching property which can be set to true.Enable Caching
精彩评论