|
Okay in original ASp I was told to never store so much data in a Session Object and to either use Cookies or a Database.
Now I'm being told not to use Cookies for this much data?
You just can't win, at least it makes sense now though, I will use my SQL database instead.
Cheers,
Gavin
PS: Thanks for the help
|
|
|
|
|
Original ASP had the problem where the session object wasn't webfarm friendly, so you had major scalability issues involved. With ASP.NET you can use a SQL Server Database to store the session data or an out-of-proc server (exe) on the network to host it; so it is webfarm friendly and thus scales pretty well.
Now of course session data is going to take up RAM on the server the session is stored on; but how much data is really being taken up per session? Probably not enough to make it matter.
James
Simplicity Rules!
|
|
|
|
|
Hi to all...
Does anybody knows how to center the child window (Main Form View) in SDI application??? I've tried tried and tried, but still cannot get the child form to be centralized.
Please help or give a little advice / pointers how to get round this. Thanks.
Rdgs, Ben
|
|
|
|
|
You can always position it manually; child.Location = new Point((ClientArea.Width - child.Bounds.Width) / 2, (ClientArea.Height - child.Bounds.Height) / 2);
James
Simplicity Rules!
|
|
|
|
|
Is there a colour picker in C# to choose from the Color enumeration by color or name ? If not, I thought I might write one, but I'd hate to do it and find out there's one as standard....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
Just the good old Color Dialog is truly documented.
I did notice a number of color pickers in the C#/Controls section here on Code Project.
Regards
|
|
|
|
|
Hi everyone,
i have an ArrayList where I have some object from my class Cxxxx. each object has one ArrayList where i would have object of my class Cxx2, but i need that this second ArrayList must be create later, only when i need, so i need to know if exist any way to access some object of Array List and modify it content.
Thanks in advance.
Salamanca 2002 Capital Cultural Europea, Visitala
|
|
|
|
|
What?
Did you try the indexer?
i.e.
MyObject o = (MyObject) myArray[i];
.
.
.
Regards
|
|
|
|
|
In C++, I would declare my data values as private members with public get/set methods. I can do the same thing in C#, but I can also use properties. Any guideance on when to use one vs the other? Is there any performance/size difference? Thanks
Chris Hafey
|
|
|
|
|
Properties basically accomplish the same thing. Each propert should have an accompanying private field for the actual value. The only advantage is that you can do this :-
abc.val = whatever;
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
You should use properties when you are dealing with storing the data in a private variable.
You should use Get/Set methods when that data is NOT being stored cannot be accessed as quickly as a "return myPrivateData;". Some applications of this type would be retreive the customer name from the database; return all the prcoesses running on the system, etc...
The line is a fine one and its quite elastic so just go with what feels right
James
Simplicity Rules!
|
|
|
|
|
Stick with Properties when appropriate.
The Property Grid likes them, the debugger likes them, and Serialization likes them.
Go with the flow, it will make your life easier...
Regards
|
|
|
|
|
Hi All,
Quick question here, I need to check to see if a cookie exists when someone enters 1 of my pages.
This is an intranet so I know that everyone accepts cookies but is there way to see if a certain cookie exists?
Thanks,
Gavin
|
|
|
|
|
Check the cookie for null
James
Simplicity Rules!
|
|
|
|
|
Tried that,
for some reason the page falls over if I try the following
if (HttpContext.Current.Request.Cookies["NewOutbreak"]["Test"] == "")
{
//Do Something amazing
}
else
{
Go home
}
I get an error saying something like cannot check for null as it doesn't exist.??
|
|
|
|
|
I wonder if you are getting the error from the "NewOutbreak" cookie not existing and then trying to access it.
Give this a shot...
<br />
Request r = HttpContext.Current.Request;<br />
if(r.Cookies["NewOutbreak"] == null)<br />
{<br />
}<br />
else if( r.Cookies["NewOutbreak"]["Test"] == null)<br />
{<br />
}<br />
else<br />
{<br />
}
I'm still working out your issue at the top
James
Simplicity Rules!
|
|
|
|
|
werkin
I see the logic, you have to check to see if the Cookie exists before checking to see if the cookies key exists or has any data...
Seems to be 100% Thanks
|
|
|
|
|
Hi,
How do you make a text box on a windows form accept numbers only?
These is really easy in VC++ 6.0, can't be hard in C#
Cheers
Ollie Riches
|
|
|
|
|
there's already a thread about that problem in this forum (currently on the next page)
:wq
|
|
|
|
|
I know two way for it.
One:
http://www.codeproject.com/cs/miscctrl/maskedcsedit.asp
Two:
Handle KeyPress event of text box yourself:
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if(e.KeyChar < 48 || e.KeyChar > 57 )
e.Handled = true;
}
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
The Answer is...
http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=160478&fr=51#xx159561xx
|
|
|
|
|
Magic is a fee source code user interface library for .NET
Now includes completely rewritten docking code that allows...
multiple docking windows in same column/row
multiple docking windows in same floating form
multiple content in same docking window
save/load docking configuration
MDI support in the MenuControl via a pendant
Numerous bug fixes
http://www.dotnetmagic.com
PS. I could not find an annoucement board as the proper place to put this. Is there one I have missed?
Phil Wright
phil.wright@dotnetmagic.com
|
|
|
|
|
Phil Wright wrote:
PS. I could not find an annoucement board as the proper place to put this. Is there one I have missed?
Good attempt at naivety
But it didn't work pal, not even a little
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Good works realy.
aspecially for docking one of the best solution i've seen.
Continue.
Continue to let it free.
Phil Wright wrote:
PS. I could not find an annoucement board as the proper place to put this. Is there one I have missed?
You must write an article and quote your site.
i thinks programers believe it's commercial if u didn't (boring after all you efforts)
thanxs
|
|
|
|
|
I created a custom control derived from a panel in which I added flat buttons but how can I add action on the buttons dynamicly ???
I can't because the class is derived from a panel.
Anybody can help me ?
|
|
|
|