DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 6 Aug 2007 23:28:13 -0500,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Ross Culver


What's Happening When I Click Refresh?   
ASP 2.0; VS2005; IIS 6.0; textbox & gridview in multiview, in AJAX updatepanel

After entering keywords into a textbox and clicking a button, a gridview is populated with applicable records.  The parameter for the underlying query is a session variable populated when the button was clicked.

That works fine.

When the user selects one of the returning rows of the gridview he is redirected to another aspx page.  When the user returns to the previous page by clicking the browser back button the multiview active grid is supposed to be set back to the one with the gridview on it based on the session variable not being empty.

This worked fine until about a week ago.  Now, in order to get the multiview activeview to be set back to the view with the grid on it, I have to click the refresh button.  As far as I know, nothing has been changed in the application.  FYI, when running the application on the server using the local files and ASP.Net development server, the page does what it's supposed to do.  But the published version does not.

Thanks for any help and time in advance.

Ross

Below is the code:


  Protected Sub Page_InitComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.InitComplete

  Try

  If Session.IsNewSession = True Then

      SetParameters()

      Refresh()

  Else

  'If there is a value in the QuickSearchPhrase session variable, do a search no matter what.

  If CType(Session.Item("QuickSearchPhrase"), String) <> "" And CType(Session.Item("QuickSearchPhrase"), String) <> Nothing Then

  Me.txtQuickSearch.Text = CType(Session.Item("QuickSearchPhrase"), String)

  Session.Item("TargetView") = 1

  Me.sqlQuickSearch.DataBind()

  Me.mvBody.ActiveViewIndex = 1

  Me.gvQuickSearch.PageIndex = CType(Session.Item("GridPageNo"), Integer)

  Me.gvQuickSearch.SelectedIndex = -1

  SetPagingLabels()

  Else

  'CurrentPage Action?

  If CType(Session.Item("CurrentPage"), Boolean) = True Then

  If CType(Session.Item("Action"), String) = "Back" Then

  'Go to the previous view.

  Me.mvBody.ActiveViewIndex = CType(Session.Item("OriginView"), Integer)

  Else

  'Go to the defined view.

  Select Case CType(Session.Item("TargetView"), Integer)

  Case 0

  Refresh()

  Case 1

  'This should actually never happen.

  'Me.txtMessage.Text = "This should never happen"

  Refresh()

  Case 2

  Me.mvBody.ActiveViewIndex = 2

  Case 3

  Me.mvBody.ActiveViewIndex = 3

  End Select

  End If

  Else

  'Go to the defined view

  Select Case CType(Session.Item("TargetView"), Integer)

  Case 0

  Refresh()

  Case 1

  'This should actually never happen.

  Me.txtQuickSearch.Text = CType(Session.Item("QuickSearchPhrase"), String)

  Me.sqlQuickSearch.DataBind()

  Me.mvBody.ActiveViewIndex = 1

  Me.gvQuickSearch.PageIndex = CType(Session.Item("GridPageNo"), Integer)

  Me.gvQuickSearch.SelectedIndex = -1

  SetPagingLabels()

  Me.txtMessage.Text = "Click the 'Home' button above to refresh this page."

  Case 2

  Me.mvBody.ActiveViewIndex = 2

  Case 3

  Me.mvBody.ActiveViewIndex = 3

  End Select

  End If

  End If

  End If

  Catch ex As Exception

  Me.txtMessage.Text = "InitComplete: " & Err.Description

  End Try

  End Sub
Date:Mon, 6 Aug 2007 23:28:13 -0500   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us