auto refresh with drop down list

Posted on 2003-03-19
Medium Priority
Last Modified: 2008-03-04
I have a .net page that uses a drop down box to select a value to generate a report.  I want to auto refresh the page every 5 min.  I tried to use the meta tag see example but when the page refreshes the value from the drop down goes back to the default and the selected report is lost. So anyone have an idea on how to keep the value from the drop down while the page refreshes, or any other way to do this.
<meta http-equiv="refresh" content="300">
Question by:grandsport
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

CRagsdell earned 225 total points
ID: 8169847
You could set the selected value as a session variable when the report is generated, then use that variable to determine the selected option in the drop down.

The session variable should stay active for 20 minutes, well past the 5 minute refresh interval.

When you build the select field for the form, use something like this to determine if that value should be selected:

<option <%If Session("SelOp") = "A" Then Response.Write" selected" End If%>>A</option>

Of course, if you are building the drop down with code, just incorporate the same concept, comparing the session variable with the recordest as you build the drop down.



Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question