473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Help with User Control & State

Here is the seniaro,

I have a user control consisting of a list of 3 Companies. e.g
1 - Company A
2 - Company B
3 - Company C - These are read from a data base and may increase in the
future.

What I wan to be able to do is have the control rember its state. with
regards to the following
1) Rember the selected company between page calls (the control will be used
on some but not all of the webpages)
2) Rember the selected company when the user returns to the site after a new
login.
3) I also currently have a class that contains a Public Shared Property,
Class Company
Public Shared Property Selected()
Return 1
End Property
End Class

A number of different pages use this Property in stored procedures,
functions etc. So the public property of this class also needs to be able
to get the value.
Just looking for Ideas on the best practice to tackle this problem
Paul
Nov 18 '05 #1
1 1208
a couple of suggestions..

1) store it in viewstate (makes the page bigger for downloads)

2) store in sesssion var.(make sure your session key is unique.... using a
GUID can be a good idea for sessin vars that are used in controls...)

"Paul Say" <sa****@tpg.com.au> wrote in message
news:eG*************@TK2MSFTNGP10.phx.gbl...
Here is the seniaro,

I have a user control consisting of a list of 3 Companies. e.g
1 - Company A
2 - Company B
3 - Company C - These are read from a data base and may increase in the
future.

What I wan to be able to do is have the control rember its state. with
regards to the following
1) Rember the selected company between page calls (the control will be used on some but not all of the webpages)
2) Rember the selected company when the user returns to the site after a new login.
3) I also currently have a class that contains a Public Shared Property,
Class Company
Public Shared Property Selected()
Return 1
End Property
End Class

A number of different pages use this Property in stored procedures,
functions etc. So the public property of this class also needs to be able
to get the value.
Just looking for Ideas on the best practice to tackle this problem
Paul

Nov 18 '05 #2

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

Similar topics

1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
1
by: | last post by:
The following code: Private Sub ClearControls(ByVal ctrl As Control) Dim i As Int32 For i = ctrl.Controls.Count - 1 To 0 Step -1 ClearControls(ctrl.Controls(i))
3
by: Jeremy | last post by:
I am relativly new to ASP.NET, and my question is this: Is it better to create a wrapper class that contains all the running settings for the application and then load that into the app state, or...
2
by: JohnK | last post by:
I have a user control with 2 buttons on it & 1 label.... as each button is pressed, they set a member variable within the class and sets the label test. I also have a get/set property for the...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
1
by: Webstorm | last post by:
Hi, I hope someone can help me sort this out a bit, Im completely lost. Here is the page I am working on: http://www.knzbusinessbrokers.com/default.asp I have 3 search critera that I need to...
2
by: StevenChiasson | last post by:
For the record, not a student, just someone attempting to learn C++. Anyway, the problem I'm having right now is the member function detAddress, of object controller. This is more or less, your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.