Refresh the page

Results 1 to 2 of 2

Thread: Refresh the page

  1. #1
    Join Date
    Dec 1969

    Default Refresh the page

    In 1st asp file I am creating Prodnum(It is key col).when I enter into 2nd asp file(this is 2nd screen) this prodnum value should display in the corresponding text box. So I created a session variable in 1st asp file(after generating the prodnum) and calling it in 2nd asp file like as follows:<BR><BR>In 1st asp file I gave,<BR><BR> session("prodnum")=""<BR> session("prodnum")=rs1.Fields("prodnum")<BR> Response.Write(session("prodnum"))<BR><BR>and In 2nd asp file I gave,<BR>&#060;% <BR> dim x<BR> x="" <BR> x=session("prodnum") <BR>%&#062;<BR><BR>==AND I AM PASSING THE SESSION VARIABLE INTO THE TEXT BOX<BR><BR>Prodnum:&#060;input NAME="Text1" TYPE="TEXT" SIZE="10" maxlength="50" readonly value="&#060;% =x %&#062;"&#062;<BR><BR>But the problem is when I created a 1st record(ex:100) it is displaying the that prodnum(100) is 2nd asp file when I enter into 2nd asp file.But if I create 2nd prodnum(ex:101),when I enter into 2nd asp file,still the 1st record prodnum(100) is displaying. It is not displaying 101. I checked by giving response.write(session("pnum")). In 1st asp file it is displaying 2nd record prodnum(101).But it is not carrying into 2nd asp file.If I give refresh in 2nd screen then it is displaying 101.But how the user know that he has to give refresh.<BR><BR>So I used meta tag in 2nd asp file to refresh the page as follows:<BR><BR>&#060;formname ="http://"&"ProdEntryScreen.asp"&#062;<BR>&#060;meta http-equiv="refresh" content="5;&#060;% =formname%&#062;"&#062;<BR>&#060;/form&#062;<BR><BR>But when I am going to enter the 1st record also it is refreshing the page for each and every 5 secs(based on content value) that too . So I can&#039t enter the values with in 5secs.If I decrease the content value(ex:0), it is refreshing the page every sec. If I increase the content value(ex:25) it is refreshing for every 25 sec. Till that time it displaying old record value only. If I didn&#039t give the value for content,it is not refreshing the page.<BR><BR>It should refresh the page only once when I enter into the 2nd screen. How to do this one?<BR><BR>Please give me the answer.<BR><BR>Thanks in advance,<BR>Anu.

  2. #2
    Join Date
    Dec 1969

    Default RE: Refresh the page

    Instead of using the meta tag, try using <BR>&#060;%response.expires = "-1"%&#062; on the top of your asp page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts