G
Guest
Hi there
I am using the following to take an account number from a datagrid in to
another page and use it to load specific details according to the account
number:
Public Sub CustomerSearchGrid_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
CustomerSearchGrid.ItemCommand
If e.Item.ItemIndex >= 0 Then
Dim Ownercell1 As TableCell = CType(e.Item.Controls(1), TableCell)
Cache.Insert("SearchAccountNumber", Ownercell1.Text & "%")
Server.Transfer("/Application/CustomerBasicInfo.aspx")
End If
End sub
*****
This works fine when the user clicks the grid the first time - but if the
BACK button is used in the browser and another entry in the datagrid
selected, the first selection remains in the cache and the first record keeps
coming back. If you hit refresh in the browser it intermittently works
correctly - but obviously this is not acceptable.
It would seem to me that the cache is not refreshing itself - I have tried
using cache.remove infront of the above but it makes no difference.... I feel
I am missing something obvious here.
If anyone knows - I would appreciate your input.
Thanks
Stuart
I am using the following to take an account number from a datagrid in to
another page and use it to load specific details according to the account
number:
Public Sub CustomerSearchGrid_ItemCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
CustomerSearchGrid.ItemCommand
If e.Item.ItemIndex >= 0 Then
Dim Ownercell1 As TableCell = CType(e.Item.Controls(1), TableCell)
Cache.Insert("SearchAccountNumber", Ownercell1.Text & "%")
Server.Transfer("/Application/CustomerBasicInfo.aspx")
End If
End sub
*****
This works fine when the user clicks the grid the first time - but if the
BACK button is used in the browser and another entry in the datagrid
selected, the first selection remains in the cache and the first record keeps
coming back. If you hit refresh in the browser it intermittently works
correctly - but obviously this is not acceptable.
It would seem to me that the cache is not refreshing itself - I have tried
using cache.remove infront of the above but it makes no difference.... I feel
I am missing something obvious here.
If anyone knows - I would appreciate your input.
Thanks
Stuart