473,499 Members | 1,955 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New Session Created on Post Back!

Hello, all ---

Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0

Here is the problem I am having. I have created a web custom control in C# which includes a datagrid, label, and code to support populating and paging the datagrid. The dataset which contains the data displayed in the datagrid is stored in a session variable.

The control displays a list of people. This control is used in two pages in an application. In one instance, it displays the results of a search by the user in a directory. In the other case, it displays the list of people working in a department on a page with information about the department.

In all cases where the control is used, a class with search criteria is passed to a web service which queries a SQL Server 2000 database and returns a dataset containing records which match the criteria. The dataset is then stored in a session variable.

When returning the results of a user-defined search, it works perfectly. When displaying on the page containing information about a department, paging produces a significant problem. When the user clicks Next, the datagrid does not display and other data on the page which is based on other session variables is wrong. I ran the debugger and discovered that every time the Next is clicked in the control from the department page, the Session_Start event is fired. When the same control is used in the search results page, the Session_Start event does not fire when the user clicks Next, and the paging is flawless.

I have seen two basic solutions in different groups. One says that something must be in a session variable or the session_start event must be coded to keep a new session from being created. Session_Start is coded, and data is placed in session variables before this problem arises, so neither of these is the problem. The other thing I have seen discussed is a restart of the ASP process. None of the conditions which should lead to such a restart seem to apply here.

If any additional information is needed, please let me know. I am at a loss to even be sure what additional information would be useful at this point. Any help would be appreciated. Thank you.
Nov 18 '05 #1
0 1171

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
7084
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
6
1568
by: -D- | last post by:
I'm trying to accomplish the following. I'm trying to get the values for the table rows that are dynamically created to persist through a redirect. Referring URL:...
1
737
by: Werner | last post by:
Hi Patrick! Can you give an example of how to use a frameset inside an aspx-file? When I create a new frameset in Visual Studio.Net it just gives me a htm-File. Or give me a link where I can...
2
2216
by: Paul | last post by:
Tried to post this hours ago, but it still isn't visible. If it's a repeat, sorry for the inconvenience. Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0...
5
2190
by: ASP.Confused | last post by:
As you can tell from my previous posts on this issue...I'm really confused :-/ I have a few ASP.NET web applications on my web host's "https" server. Our web host has a single "bin" folder for...
1
1035
by: Paul | last post by:
Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0 Here is the problem I am having. I have created a web custom control in C# which includes a datagrid,...
0
1012
by: sasidar.d | last post by:
hi techies I have created a Login web page . It gets the user identity using the window nt authetication. The page is working fine. I have removed the allow anonymous access check box for the...
2
2622
by: Gordon Burditt | last post by:
I had this idea about preventing session fixation, and I'm wondering what anyone else thinks about it. The idea is, essentially, don't allow session ids that YOUR PHP didn't generate (and aren't...
11
3608
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6894
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4600
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.