473,396 Members | 1,827 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,396 software developers and data experts.

Automate the back

Hi

How can I auomate the 'Back' ie if anything fails return the user to the
previous page

Thank you,
Samuel
Dec 14 '06 #1
7 952
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:ug**************@TK2MSFTNGP03.phx.gbl...
How can I auomate the 'Back' ie if anything fails return the user to the
previous page
Not sure what you mean exactly... Do you mean Response.Redirect()...?

E.g. if you have a form with some controls which the user fills in, then
hits a "Save" button which creates a new record in a database, if the data
is invalid in some way wouldn't you want to stay on the current page so that
the data is preserved in ViewState and you could pop an alert telling the
user which field(s) contained the invalid data? Then the user could amend
the invalid data and try again...?
Dec 14 '06 #2
I do something in the Load Event of the form (it must be in the Load event)
and if it fails the user must load the page again

One way is by sending the user to the page where he came from

Thank you
Sam
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:ec**************@TK2MSFTNGP03.phx.gbl...
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:ug**************@TK2MSFTNGP03.phx.gbl...
>How can I auomate the 'Back' ie if anything fails return the user to the
previous page

Not sure what you mean exactly... Do you mean Response.Redirect()...?

E.g. if you have a form with some controls which the user fills in, then
hits a "Save" button which creates a new record in a database, if the data
is invalid in some way wouldn't you want to stay on the current page so
that the data is preserved in ViewState and you could pop an alert telling
the user which field(s) contained the invalid data? Then the user could
amend the invalid data and try again...?

Dec 14 '06 #3
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:OB**************@TK2MSFTNGP02.phx.gbl...
>I do something in the Load Event of the form (it must be in the Load event)
and if it fails the user must load the page again
Er, OK...
One way is by sending the user to the page where he came from
Are you able to use Request.ServerVariables["HTTP_REFERER"].ToString()?
Whereas this can't be relied upon for the initial connection to an external
ASP.NET site, once the Session has started it might work well enough...
Dec 14 '06 #4
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:BD**********************************@microsof t.com...
If you need to load the page again because of something not "working"
programmatically, why can't you just have code that does a
Response.Redirect
(or even Server.Transfer - more efficient) back to the same page?
Indeed - see my first reply...
Dec 14 '06 #5
The problem with this that if the problem will linger then it will never
stop

But in second thought I can use a session variable to count and stop as
necessary

Thank you all
Samuel
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:ue***************@TK2MSFTNGP06.phx.gbl...
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:BD**********************************@microsof t.com...
>If you need to load the page again because of something not "working"
programmatically, why can't you just have code that does a
Response.Redirect
(or even Server.Transfer - more efficient) back to the same page?

Indeed - see my first reply...

Dec 14 '06 #6
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
The problem with this that if the problem will linger then it will never
stop
??? In your OP you said "if anything fails"... By that, did you not mean "if
an error occurs"?
Dec 14 '06 #7
Yes that was referring to an exception
By now it is all sorted

thanks
Samuel

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:ue**************@TK2MSFTNGP02.phx.gbl...
"Samuel Shulman" <sa************@ntlworld.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>The problem with this that if the problem will linger then it will never
stop

??? In your OP you said "if anything fails"... By that, did you not mean
"if an error occurs"?

Dec 14 '06 #8

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

Similar topics

10
by: Geoff Cox | last post by:
Hello Is it possibel to automate the access time allowed to a folder? I am using .htpasswd etc and would like to give say 0.5 hour access to users so that they can sample documents available on...
3
by: Brad Burke | last post by:
From a windows .Net app, I need to 1) check if MSAccess is already open to a certain Access application. If so, then open a form and find a certain record. 2) If not open, then open MSAccess and...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
25
by: MLH | last post by:
In an earlier post entitled... "A97 closes down each time I open a particular report" it has been suggested that I rebuild problematic table - one in which some corruption has occurred. I...
1
by: Vijay Neelam | last post by:
How can I automate Microsoft Word from ASP.NET. My requirement is like this I have Datagrid with checkboxes... I need to export checkbox selected rows into Microsoft Word. I tried to...
3
by: D | last post by:
I would like to write a program that will automate the configuation of a firewall or router via HTTPS. So, I need to import the applicable certificate, and be able to configure the unit as if I...
10
by: Killer42 | last post by:
Hi all. If necessary I'll repost this in the Windows forum, but I thought this would be a good place to hit a fair cross-section of the community. Besides, anyone can see that all the best brains...
9
by: Ots | last post by:
I'm using SQL 2000, which is integrated with a VB.NET 2003 app. I have an Audit trigger that logs changes to tables. I want to apply this trigger to many different tables. It's the same trigger,...
1
by: tmcjunkin | last post by:
I'm trying to back into this project by defining what the user needs to see when they open a form. I'm between beginner and intermediate with vba, but have been using access for years. When the...
2
by: =?Utf-8?B?QWxleGFuZGVyIFd5a2Vs?= | last post by:
Is it possible to automate a COM object ebmeded in an excel document run the process and return the results in a C# .NET application? Or better yet extract the com object some how and just run it...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.