Update of /cvsroot/magicajax/magicajax/Core/UI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12381/Core/UI
Modified Files:
AjaxPage.cs AjaxUserControl.cs
Log Message:
Fixed Page.Request/Page.Response not being valid during an AjaxCall.
Replaced GetControlHash method by Page.GetTypeHashCode.
Index: AjaxUserControl.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxUserControl.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AjaxUserControl.cs 14 Nov 2005 18:50:43 -0000 1.2
--- AjaxUserControl.cs 16 Nov 2005 08:08:58 -0000 1.3
***************
*** 26,41 ****
{
/// <summary>
! /// Includes the AjaxCall event, Context, Request and Response, for convenience.
/// </summary>
/// <remarks>
! /// You can implement the IAjaxCallEventHandler on your usercontrol to handle the
! /// AjaxCall event, and use the HttpContext.Current, AjaxCallHelper.Request and
! /// AjaxCallHelper.Response properties.
! ///
! /// You cannot use the Context, Request and Response of the System.Web.UI.UserControl
! /// because, during an AjaxCall, the Context of the page is invalid. If you don't want
! /// to replace the UserControl.Request and UserControl.Response from your code for
! /// AjaxCallHelper.Request and AjaxCallHelper.Response, and your usercontrol is inherited
! /// from System.Web.UI.UserControl, you can use AjaxUserControl for convenience.
/// </remarks>
public class AjaxUserControl : System.Web.UI.UserControl, IAjaxCallEventHandler
--- 26,34 ----
{
/// <summary>
! /// Includes the AjaxCall event.
/// </summary>
/// <remarks>
! /// Inheriting from AjaxUserControls is not required, you can implement the
! /// IAjaxCallEventHandler on your usercontrol to handle the AjaxCall event.
/// </remarks>
public class AjaxUserControl : System.Web.UI.UserControl, IAjaxCallEventHandler
***************
*** 47,72 ****
/// <summary>
- /// The base UserControl Request property doesn't work during an AjaxCall. Use this instead.
- /// </summary>
- public new HttpRequest Request
- {
- get
- {
- return Context.Request;
- }
- }
-
- /// <summary>
- /// The base UserControl Response property doesn't work during an AjaxCall. Use this instead.
- /// </summary>
- public new HttpResponse Response
- {
- get
- {
- return Context.Response;
- }
- }
-
- /// <summary>
/// Raises the AjaxCall event.
/// </summary>
--- 40,43 ----
***************
*** 79,90 ****
}
- protected override HttpContext Context
- {
- get
- {
- return HttpContext.Current;
- }
- }
-
protected virtual void OnAjaxCall(EventArgs e)
{
--- 50,53 ----
Index: AjaxPage.cs
===================================================================
RCS file: /cvsroot/magicajax/magicajax/Core/UI/AjaxPage.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AjaxPage.cs 14 Nov 2005 18:50:43 -0000 1.2
--- AjaxPage.cs 16 Nov 2005 08:08:58 -0000 1.3
***************
*** 26,42 ****
{
/// <summary>
! /// Includes the AjaxCall event, Context, Request and Response, for convenience.
/// </summary>
/// <remarks>
/// Inhering from AjaxPage is not required to apply AJAX on your pages. You can
! /// implement the IAjaxCallEventHandler on your page to handle the AjaxCall event, and
! /// use the HttpContext.Current, AjaxCallHelper.Request and AjaxCallHelper.Response
! /// properties.
! ///
! /// You cannot use the Context, Request and Response of the System.Web.UI.Page
! /// because, during an AjaxCall, the Context of the page is invalid. If you don't want
! /// to replace the Page.Request and Page.Response from your code for
! /// AjaxCallHelper.Request and AjaxCallHelper.Response, and your page is inherited
! /// from System.Web.UI.Page, you can use AjaxPage for convenience.
/// </remarks>
public class AjaxPage : System.Web.UI.Page, IAjaxCallEventHandler
--- 26,34 ----
{
/// <summary>
! /// Includes the AjaxCall event.
/// </summary>
/// <remarks>
/// Inhering from AjaxPage is not required to apply AJAX on your pages. You can
! /// implement the IAjaxCallEventHandler on your page to handle the AjaxCall event.
/// </remarks>
public class AjaxPage : System.Web.UI.Page, IAjaxCallEventHandler
***************
*** 48,73 ****
/// <summary>
- /// The base Page Request property doesn't work during an AjaxCall. Use this instead.
- /// </summary>
- public new HttpRequest Request
- {
- get
- {
- return Context.Request;
- }
- }
-
- /// <summary>
- /// The base Page Response property doesn't work during an AjaxCall. Use this instead.
- /// </summary>
- public new HttpResponse Response
- {
- get
- {
- return Context.Response;
- }
- }
-
- /// <summary>
/// Raises the AjaxCall event.
/// </summary>
--- 40,43 ----
***************
*** 80,91 ****
}
- protected override HttpContext Context
- {
- get
- {
- return HttpContext.Current;
- }
- }
-
protected virtual void OnAjaxCall(EventArgs e)
{
--- 50,53 ----
|