473,804 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you detect when a page has only been refreshed?

I'm trying to write an ASP interface that mimiks a .Net datagrid control.
I'm having a problem when I'm in the middle of an Edit, Update, or a New
Record. If the user hits the wrong button, the program grabs the values in
the textboxes using the request.form() and then redisplays them in the
textboxes when the records table gets written back out to the page. This
works fine as long as the form is submitted. If it's just a page refresh
(F5), the program doesn't get the latest changes to the textboxes and
displays either a blank or whatever was in there the last time the form was
submitted. Anybody got any ideas?

Jim
Feb 4 '07 #1
1 4369
Gazing into my crystal ball I observed "JimO"
<jo***********@ XXXearthlink.ne twriting in
news:yL******** ***********@new sread1.news.pas .earthlink.net:
I'm trying to write an ASP interface that mimiks a .Net datagrid
control. I'm having a problem when I'm in the middle of an Edit,
Update, or a New Record. If the user hits the wrong button, the
program grabs the values in the textboxes using the request.form() and
then redisplays them in the textboxes when the records table gets
written back out to the page. This works fine as long as the form is
submitted. If it's just a page refresh (F5), the program doesn't get
the latest changes to the textboxes and displays either a blank or
whatever was in there the last time the form was submitted. Anybody
got any ideas?

Jim
dim defaultvalues, defarr, iscompleted, required, name

defaultvalues = "Your name, your address, yo*@example.com"
defarr = split(defvaultv alues,", ")
if request.serverv ariables("reque st_method") = "POST" then
if request.form("n ame") = "Your name" then
required = "name"
end if
if required <"" then
'do not complete processing
else
'complete processing
iscompleted = true
name = defarr(0)
end if
else
name = defarr(0)
end if

%>
<form method="post" action="<%=requ est.servervaria bles
("script_name") %>">
<label for="name" id="name1">Nam e </label<input type="text"
name="name" id="name" value="<%=name% >" onfocus="if(thi s.value == '<%
=name%>') this.value = '';"><br>
.....
<input type="submit" value="Submit">
</form>
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Feb 5 '07 #2

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

Similar topics

23
6533
by: David McCulloch | last post by:
QUESTION-1: How can I detect if Norton Internet Security is blocking pop-ups? QUESTION-2a: How could I know if a particular JavaScript function has been declared? QUESTION-2b: How could I know if Window.Open has been redefined? BACKGROUND:
1
2618
by: Matt | last post by:
When the page is refresh, it will first call window_unload() and then call window_load(). The problem is I window_unload() is invoked when the user click close button, or right top icon close button. I don't want refresh will call window_unload. Any ideas? thanks!! function window_load() {//etc.. }
0
1256
by: Alfons Puig | last post by:
I have a container page with 3 frames (Header, left frame and right frame) In the right frame I load an aspx page having a boounded datagrid with some column templates having a DopDownList in the column header in order to select some values to be displayed in the grid. It works perfectly. This page is refreshed every n seconds (using http-equiv refresh or Response.AppendHeader("Refresh",n)). It works perfectly. But if I open one of the...
1
2024
by: abdul bari | last post by:
Hi I have a standard html form which is generated by an XSL sheet. The form data is submitted to the server and is passed on to file.aspx for processing. However file.aspx is refreshed every 5 seconds, when this happens the form data is lost, is there anyway whereby when the page is refreshed the form data remains. I thought with ASP.NET all data is maintained- so a refresh will still maintain the form data. The form data is obtained...
6
5243
by: hb | last post by:
Hi, Would you please tell me how to detect if the client's browser is closed? I need such event to trigger a database modification. Thank you hb
5
1479
by: J-T | last post by:
Is there a way to detect if a user has refreshed a page in asp.net? Thanks a lot
0
1301
by: SIXFACESANKAR | last post by:
Hi, In my application, once the user logs in code is written in session_onstart to update / insert the user status . Also there is code written in session_onend to update the user status again. When the user logs in , session_onstart code is working correctly . But when the user either logs off / close the application window , there is no change in the user count .i.e session_onend code is not working fine.
3
1113
by: Mythilisg | last post by:
hi, i'm working in asp.net with c#. i hav one dropdownlist with some options which is similar to Security Questions in yahoo mail. I hav one option called "If Others". When the user selects this option, one label and textbox will become visible on the form to type for the user. But the problem is when the user chooses the option "If Others", the page gets refreshed. But i dont want the page to get refreshed. can any one tell me what i need...
1
3235
by: jim bradshaw | last post by:
I have an asp.net page that calls itself recursively if the user selects certain actions on form buttons. The page will be changed in various ways according to the action called for by the user. This works fine, except for the fact that the "action" variable is a hidden field and if the user hits the refresh button or navigates to the page by the "back" button or other methods, the latest "action" will be performed again. Does anyone out there...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10351
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10096
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.