Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

auto refresh with drop down list

Posted on 2003-03-19
1
Medium Priority
?
246 Views
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.
<head>
<meta http-equiv="refresh" content="300">
</head>
0
Comment
Question by:grandsport
1 Comment
 
LVL 4

Accepted Solution

by:
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.

CR

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

580 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