| | |
user configurable refresh time
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2006
Posts: 399
Reputation:
Solved Threads: 14
Hi,
I have a site and I want the user to be able to select the refresh time. I set it on page load:
Then the user can change it via a drop down list. In the list changed I put:
I hoped it would save the new value but it always defaults back to the original value. I even moved the code from page_load to page_init no difference. Any ideas where im going wrong?
I have a site and I want the user to be able to select the refresh time. I set it on page load:
ASP Syntax (Toggle Plain Text)
void Page_Load(Object sender, EventArgs e) { Response.AppendHeader("Refresh", "10"); }
Then the user can change it via a drop down list. In the list changed I put:
ASP Syntax (Toggle Plain Text)
protected void RefreshTime_SelectedIndexChanged(object sender, EventArgs e) { string refreshtime = RefreshTime.AutoPostBack.ToString(); RefreshTime.Items.FindByValue(refreshtime).Selected = true; Response.AppendHeader("Refresh", ""+refreshtime+""); }
If my post helped add to my rep!
add not post back condition in page load
like this
like this
ASP Syntax (Toggle Plain Text)
if(!IsPostBack) { Response.AppendHeader("Refresh", "10"); }
Last edited by peter_budo; May 26th, 2009 at 6:56 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Thanks and Best of Lusk,
Farid ud din Masood
MS.c (CS)
University of Agriculture, Faisalabad
Farid ud din Masood
MS.c (CS)
University of Agriculture, Faisalabad
![]() |
Other Threads in the ASP Forum
- Previous Thread: Why ASP.NET is much better choice for programmers?
- Next Thread: Converting an IIS wepage to a mobile page
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





