473,416 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

meta refresh loosing the viewstate on the TextBox

I am sure there is an easy fix for this problem. I am reloading the same
page at an interval using the meta refresh tag in aspx page. This page has
one textbox and one button. The problem is -when the page get posted back to
the server the value of the textbox is gone. How do I preserve the value of
the textbox that I entered in it?

I don't want to use Cache/Session to keep track of the value. That's not an
option.

Thanks for your reply.
Prodip
Nov 19 '05 #1
2 2195
Your problem is that the meta refresh doesn't cause a postback. Rather,
it's a completely new page request. Therefore viewstate is not saved.
Perhaps you should use a javascript timer instead to manually cause a
postback.
Or you could maybe stick with the meta refresh and store data in Session
instead of ViewState.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Prodip Saha" <ps***@bear.com> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl...
I am sure there is an easy fix for this problem. I am reloading the same
page at an interval using the meta refresh tag in aspx page. This page has
one textbox and one button. The problem is -when the page get posted back
to
the server the value of the textbox is gone. How do I preserve the value
of
the textbox that I entered in it?

I don't want to use Cache/Session to keep track of the value. That's not
an
option.

Thanks for your reply.
Prodip

Nov 19 '05 #2
Steve,
That explained the underlying problem (new request). I was using the meta
tag and setting the refresh time according to the work-flow. I will try to
use javascript instead to preserve the viewstate, as you have suggested.

Thank you much.
Prodip

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:uX**************@TK2MSFTNGP11.phx.gbl...
Your problem is that the meta refresh doesn't cause a postback. Rather,
it's a completely new page request. Therefore viewstate is not saved.
Perhaps you should use a javascript timer instead to manually cause a
postback.
Or you could maybe stick with the meta refresh and store data in Session
instead of ViewState.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Prodip Saha" <ps***@bear.com> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl...
I am sure there is an easy fix for this problem. I am reloading the same
page at an interval using the meta refresh tag in aspx page. This page has one textbox and one button. The problem is -when the page get posted back to
the server the value of the textbox is gone. How do I preserve the value
of
the textbox that I entered in it?

I don't want to use Cache/Session to keep track of the value. That's not
an
option.

Thanks for your reply.
Prodip


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Shiperton Henethe | last post by:
Hi Is there anyway to get a meta refresh to do so in an new browser window? e.g. This code forwards this user after 8 seconds... <meta http-equiv=refresh...
10
by: neo | last post by:
hi, I am studying ASP.NET and have few questions - 1) The session ID and values of controls is stored in VIEWSTATE variable. So now when we put EnableViewState="false" in Page directive and...
1
by: Maziar Aflatoun | last post by:
Hi everyone, My goal is to modify the contents of my meta tag (html refresh). However, my code adds a new instance of the meta tag at the bottom of the page. Is there a way to modify it instead...
7
by: et | last post by:
I'm not sure I understand the use of the ViewState. Do I understand correctly that values of controls are automatically held in a hidden control called ViewState? If so, then why can't we get...
4
by: D. Shane Fowlkes | last post by:
This may be a very simple question but I'm stumped none the less. I have a form where a user provides comments. There's a Grid below this form which displays all comments in the table so far. On...
4
by: Tim::.. | last post by:
Can someone please tell me why the following dynamic refresh doesn't work! Thanks Inline code... <!----- dynamically filled META REFRESH element -----> <meta id="mtaRefresh" runat="server" />...
0
by: jobs | last post by:
I have a page where users select from a bunch of gridviews, setting session variables and then hit an a New or Edit button which redirects them to a formview in edit or insert mode. While in...
1
by: Falcula | last post by:
Hello, I have a treeview control, when i select a item i navigate to url. But selected node is lost, it reset itself, loosing state. I post my code here. Thanks in advance. <script...
2
by: qwedster | last post by:
Folks! The following is a "Hello World" kind of code for ViewState. I just want to know how to retain the ViewState 1) while Page Refresh when using UpdatePanel and also 2) While I reverting back...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.