|
Session Variables is only working on the Same Page but its not transfering the value to another page in asp.net 2.0.How can I get a Session value.
KR.RAMESH
|
|
|
|
|
Member 3824224 wrote: Session Variables is only working on the Same Page but its not transfering the value to another page in asp.net 2.0
please clear your problem .
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
How are you accessing the value of session in the next page? Unless you give some more details it will be tough to understand the problem.
Apurva Kaushal
|
|
|
|
|
That's not possible. You need to post some code so we can see where your error is.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Login.aspx
gstrUserId = gmdataset.Tables(0).Rows(0)(0)
Session("USERID") = gstrUserId
game.aspx
dim lstrvalue as string
lstrvalue = Session("USERID").ToString
But i am not getting a value .but i am getting nothing only.How can i get a session value.
KR.RAMESH
|
|
|
|
|
Member 3824224 wrote: Session("USERID") = gstrUserId
Did you debug it to make sure this line is storing a value ? If so, then my guess would be that your server is set up to store sessions state in a DB that is not set up properly, or something along those lines. This code will just work on a properly set up PC, there's really no room for it to fail.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Are cookies enabled on the web browser?
What type of session are you using?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Login.aspx
gstrUserId = gmdataset.Tables(0).Rows(0)(0)
Session("USERID") = gstrUserId
game.aspx
dim lstrvalue as string
lstrvalue = Session("USERID").ToString
But i am not getting a value .but i am getting nothing only.How can i get a session value.
KR.RAMESH
|
|
|
|
|
Login.aspx
gstrUserId = gmdataset.Tables(0).Rows(0)(0)
Session("USERID") = gstrUserId
game.aspx
dim lstrvalue as string
lstrvalue = Session("USERID").ToString
But i am not getting a value .but i am getting nothing only.How can i get a session value.
KR.RAMESH
|
|
|
|
|
i had made a site in which there is table which has 15 lacs records.
when user access a form all records fetched from that table shown in that form.
when user search something large number of records are shown approx on average 10 lacs or above.
this will hanged all the site.
Is their any solution to solve this.
|
|
|
|
|
It is not necessary to display all the records at time. If it is based on searach then filter the search criteria that minimum of result comes. or you can use cache for that.
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
what on earth is a lacs ?
The solution is to optimise your SQL, and to write SQL that only returns a single page of data, so you can use paging to access your other records and you don't pull down records you don't show every time.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: what on earth is a lacs ?
1 lac = 100,000
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
As mentioned by CG you need to use paging concept. Display some records and if users wants get next set of records from the database.
Apurva Kaushal
|
|
|
|
|
Trying to fetch 15 lakh records at a time is a sure-kill on the IIS and the database server. You seriously need to consider revising your stored procedures to optimize the data access.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I want to format date like "yyyy-mm-dd" when binding,
but it can't like this "<%# Bind("Birthday","{yyyy-mm-dd}") %>"
|
|
|
|
|
Hi
Are you binding data from database? You can do it in SQL Query using the convert() function as given below:
SELECT CONVERT(NVARCHAR(10),Birthday,121) AS Birthday FROM Table1
Harini
|
|
|
|
|
It can not be formatted in asp.net?
if it can ,I want to learning.
|
|
|
|
|
Then try this when binding data:
DateTime DtmDate = DateTime.Now;<br />
<br />
System.Globalization.DateTimeFormatInfo dfi = new System.Globalization.DateTimeFormatInfo();<br />
<br />
dfi.ShortDatePattern = "yyyy-MM-dd";<br />
<br />
Response.Write(DtmDate.ToString("d", dfi));
Harini
modified on Wednesday, April 30, 2008 1:35 AM
|
|
|
|
|
<%# Eval("Birthday", "{0:yyy-mm-dd}") %><pre>
|
|
|
|
|
Can't them be find by FormView.FindControls method in EdititemTemplate.
How get those controls in EdititemTemplate?
|
|
|
|
|
|
Hi everyone,
Is there a way to automatically delete information from fields in a database after sometime has passed? For example if I want to delete a user's info from my database after he or she has been inactive for so long? Is there a setting in SQL 2005 that would let me do that or must I do it programmatically? Please explain the details of how to do this if you can or point me to a site that goes into details on this. Thank you in advance for your help.
modified on Tuesday, April 29, 2008 10:31 PM
|
|
|
|
|
No, you can't do that. You can store a date stamp on a record, and the next time the DB is accessed, delete it as having timed out.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there Christian, I haven't bugged you in a while. So are saying that I can not automatically delete data from a SQL database through code and instead would have to delete it manually? If I write a function to access the database to make it search for the datetime field that has reached a preset time, then tell it to delete all info in the same row as the datetime, I think it would be possible to what I intended. The only problem is the function would have to be triggered by something outside of the database if the database can't communicate with the function. What is your opinion on that? Please give a better solution if you can think of one. Thanks in advance for your time.
|
|
|
|