|
Two thoughts.
1. Is db1 populated at this point? If it's null then the Session will still be empty.
2. Are you running a multi-core machine? If so, you can run into problems with state management if your state service is running "in process". To get round this, you need to run your session manager as either a Sql state service or ASP State Service.
Assuming that you want to run as the ASP.NET state service, if you look in your Services, you will see one of the services is called ASP.NET State Service. This needs to be running, and you must set your config file to run the sessionState as StateServer. Typically this would look something like
<sessionState mode="StateServer"
stateConnectionString="tcpip=dataserver:42424"
cookieless="false"
timeout="20"/>
|
|
|
|
|
thanks for the reply got it sorted now!
|
|
|
|
|
Jamie1985 wrote: I need to set this string as a global session for the page.
Session variables are not global, they are specific for the user.
If you want a global value, use an Application variable instead:
Application["gdb1"] = db1;
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
|
|
Could you describe exactly what the valid input is that you want in all it's different forms
i.e.
+27XXXXXXXXX where X is a number
or
0XXXXXXXXXXX where X is a number
or
+0XXXXXXXXXXX where X is a number
then also exactly describe what format you want the input to be saved in.
|
|
|
|
|
the users can type in
+27XXXXXXXXX where X is a number (it will be 12 charaters)
or
0XXXXXXXXX where X is a number (it will be 10 charaters)
it can be saved in either format. The main thing is that the +27 is optional and there should be no spaces.
J9
|
|
|
|
|
You will have two parts: the prefix (either +27 or 0) then the number (9 digits). The regex would be:
(?:\+27|0)\d{9}
The "?:" part, says that we do not want to capture the text matched by the "stuff" in the parenthesis into a separate group.
If you need to get each part separately, then you could group each part, like so:
(?<prefix>\+27|0)(?<number>\d{9})</number></prefix>
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
|
hi,
i m having a integer array which i need to sort frequently
example code:
int[] intarray = new intarray[5];
in between the code
array.sort(intarray);
now this code runs fine sometime and sometime it fails
error is
Failed to compare two elements in the array.
pla if anyone is having any idea abt this then plz do let me know
regards sindhu tiwari
its me sid
modified on Friday, January 04, 2008 3:26:44 AM
|
|
|
|
|
Array.Sort() fails for vanilla integer arrays? While it's possible, I think it's highly unlikely.
Have you googled for the exact exception message? I doubt if you've given the exact message, and Google returns no results.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
this is the error which i got "Failed to compare two elements in the array."
and searched on google too but unfortunately dint got proper result if u any way to sort or any idea then plz do let me now
sindhu tiwari
its me sid
|
|
|
|
|
Well, could you show us what values you've put in the array then?
|
|
|
|
|
ya sure
intarray[0]=1;
intarray[1]=2;
intarray[2]=null;
intarray[3]=3;
intarray[4]=null;
i hope this will help you ..thanks for response
regards
sindhu tiwari
its me sid
|
|
|
|
|
It certainly does. You can't sort an array of ints if they have nulls in them. Convert intarray into a nullable int instead, i.e. make it int? . Mind you, I don't see how you could have got this code past the compiler because an ordinary int can't contain a null value so the system should have choked on it.
|
|
|
|
|
would u plz tell me how to make it a nullable int array.........
regards
sindhu tiwari
its me sid
|
|
|
|
|
I already did. Add the question mark (?) after the int. So you would have
int?[] intarray = new int?[5];
|
|
|
|
|
Hi,
I am developing a windows application. In this I have a list box which should be populated with a list of categories in the form load event.I've used a DataReader to do this. when I add a new category it should be automatically added to the list box also.I should use a seperate form to add a new category.If it's a Web appl it's very easy as the page will be refereshed every time.
|
|
|
|
|
I need to create such type of application through which i increase and decrease the volume of the system.
and mute and mute the sound from the application.
both master volume and wave volume handles.
|
|
|
|
|
|
Hello,
I am trying to cnvert a WORD file into a PDF in C#.NET. For that I am using GhostScript. It folows two steps.
1) Conversion of WORD TO PS
2) Conversion of PS TO PDF.
I can get the PS Fromat, but then I have to manually double click on PS File to get the PDF format. How do I get it automatically?
Help needed...
Thanks in advance
Vruddhi
|
|
|
|
|
I have made a small software which requires .Net framework 2.0 and Sql server Express.I want to make a setup file which automatically installs these two components.
How can i achieve this??
|
|
|
|
|
Make a setup project in your same application then
Right Click on your setup project and go to properties
by doing this a new window opens, on that window there is a button
with the name of prerequisites click on it
and it will solve your problem
|
|
|
|
|
|
Someone told me that the method needs memory ,is this true? In this way,does the static method can share their memories?
Thanks!
|
|
|
|