Click here to Skip to main content
15,925,505 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Testing Tool Pin
Brady Kelly2-May-07 23:55
Brady Kelly2-May-07 23:55 
AnswerRe: Testing Tool Pin
Sandeep Akhare2-May-07 23:40
Sandeep Akhare2-May-07 23:40 
GeneralRe: Testing Tool Pin
jayarajmrj3-May-07 1:06
jayarajmrj3-May-07 1:06 
GeneralRe: Testing Tool Pin
N a v a n e e t h3-May-07 3:25
N a v a n e e t h3-May-07 3:25 
AnswerRe: Testing Tool Pin
firozu3-May-07 0:12
firozu3-May-07 0:12 
QuestionSession State Pin
Senthil_M2-May-07 23:24
Senthil_M2-May-07 23:24 
AnswerRe: Session State Pin
kubben3-May-07 2:56
kubben3-May-07 2:56 
Questionloosing data between postbacks [modified] Pin
Ayman Mashal2-May-07 22:25
Ayman Mashal2-May-07 22:25 
Hi
in page_load im calling a function that retrieve data from the database

<small>private void getLocationStdHours()<br />
{<br />
	string cacheKey = "stdHoursDS";  //the key to get/set our cache'd data<br />
	LocationsBL Loc = new LocationsBL();<br />
	DataSet ds=Loc.GetLocationStdHours(vLocCode);<br />
<br />
	Cache.Insert(cacheKey,ds,null,DateTime.Now.AddHours(1), TimeSpan.Zero);<br />
	dgLocStdHours.CurrentPageIndex=0;<br />
	dgLocStdHours.DataSource=((DataSet)Cache["stdHoursDS"]).Tables[0];<br />
	dgLocStdHours.DataKeyField="rownum";<br />
	Response.Write("before : "+((DataSet)Cache["stdHoursDS"]).Tables[0].Rows.Count);<br />
	dgLocStdHours.DataBind();		<br />
			<br />
	btnNew.Disabled = false;<br />
}</small>


the data shows fine without problems
but when i click the "New Record" button which is a server control
private void btnNew_ServerClick(object sender, System.EventArgs e)<br />
		{<br />
			DataSet ds = Cache["stdHoursDS"] as DataSet;<br />
					<br />
			if(ds == null)<br />
			{<br />
				Response.Write("Session timeout - please reload page");<br />
				return;<br />
			}<br />
			.....

the Cache["stdHoursDS"] is null now !!!
but not always in some cases it works sometimes not ?

what is the problem here ?

Note : this problem just appear when i connect from outside the local lan
using VPN or the intranet . its work prfectly from my PC or other PCs in the same lan

thanks



-- modified at 4:43 Thursday 3rd May, 2007
AnswerRe: loosing data between postbacks Pin
kubben3-May-07 2:54
kubben3-May-07 2:54 
GeneralRe: loosing data between postbacks Pin
Ayman Mashal5-May-07 18:56
Ayman Mashal5-May-07 18:56 
GeneralRe: loosing data between postbacks Pin
kubben6-May-07 1:02
kubben6-May-07 1:02 
QuestionDreamWeaver Dream Pin
matjame2-May-07 22:05
matjame2-May-07 22:05 
AnswerRe: DreamWeaver Dream Pin
steffw2-May-07 22:18
steffw2-May-07 22:18 
QuestionSearch code Pin
Stormint2-May-07 21:40
Stormint2-May-07 21:40 
AnswerRe: Search code Pin
Sathesh Sakthivel2-May-07 21:49
Sathesh Sakthivel2-May-07 21:49 
AnswerRe: Search code Pin
Sandeep Akhare2-May-07 22:00
Sandeep Akhare2-May-07 22:00 
QuestionSVG ( Scalable Vector Graphics) Pin
jayarajmrj2-May-07 21:28
jayarajmrj2-May-07 21:28 
AnswerRe: SVG ( Scalable Vector Graphics) Pin
badgrs2-May-07 22:48
badgrs2-May-07 22:48 
QuestionUrgent Role based menu question. Pin
coolestCoder2-May-07 20:48
coolestCoder2-May-07 20:48 
AnswerRe: Urgent Role based menu question. Pin
Sandeep Akhare2-May-07 21:04
Sandeep Akhare2-May-07 21:04 
QuestionSerial No Pin
Mkanchha2-May-07 20:41
Mkanchha2-May-07 20:41 
AnswerRe: Serial No Pin
Sathesh Sakthivel2-May-07 20:44
Sathesh Sakthivel2-May-07 20:44 
GeneralRe: Serial No Pin
Mkanchha2-May-07 21:04
Mkanchha2-May-07 21:04 
GeneralRe: Serial No Pin
Sathesh Sakthivel2-May-07 21:47
Sathesh Sakthivel2-May-07 21:47 
AnswerRe: Serial No Pin
RaghuSanta2-May-07 21:36
RaghuSanta2-May-07 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.