i cant call Response.Redirect On the Webservice Event my code is :
On Page Load
if (!Page.IsPostBack)
{
PublicService.WebService1.Select_Category_By_Type_And_EntityTypeCompleted += WebService1_Select_Category_By_Type_And_EntityTypeCompleted;
PublicService.WebService1.Search_SuggestCompleted += WebService1_Search_SuggestCompleted;
}
On Event Code
if (e.Error == null)
{
if (e.Result.Length > 0)
{
ViewState["SearchSuggest"] =Language.HelperD.SerializeDataContent( e.Result.ToList());
Timer1.Enabled = true;
// Session["SearchSuggest"] = ViewState["SearchSuggest"];
Response.Redirect("../Suggest/SearchResult.aspx", false);
}
}
Error is An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code
Additional information: Response is not available in this context. Response is not available in this context.
Next Error ON set the Session
Error is : Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration
my Config is: see enableSessionState="true" !
<%@ Page Title="" Language="C#" MasterPageFile="~/Base.Master" AutoEventWireup="true" Async="true" EnableSessionState="true" CodeBehind="SearchResult.aspx.cs" Inherits="TourismWeb.Suggest.SearchResult" %>
And....
<pages theme="DeltaModerno1" controlRenderingCompatibilityVersion="4.0" enableSessionState="true" validateRequest="true" clientIDMode="AutoID" asyncTimeout="999999" enableViewStateMac="false" enableViewState="true">
<controls>
<add tagPrefix="dx" namespace="DevExpress.Web" assembly="DevExpress.Web.v16.2, Version=16.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>