Hi,
This might be a little odd but I need to implement a back/"return to
previous page" function from different pages within my asp.net
application. The page the back button on has a property that stores
an id value that the page i will be returning to will require to
display data. The entire application does not use querystrings, and
I don't want to use session variables to store this value.
The page also has controls that require validation (that a value
exists, numeric etc). If the back button is created and has
CausesValidatio n set to True, I obviously get validation errors.
If the back button has CausesValidatio n set to false, the property on
the page is automatically destroyed.
Is there a way to implement my back functionality without resorting to
querystring or session variables?
Cheers
Greg 3 1634
Have you tried the properties: CommandName and CommandArg on the button? For
example: CommandName="Ba ck" and CommandArg= the ID. Then setup the OnCommand
event handler to intercept this click.
--- Peter Blum www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"Greg Krzeszkowski" <gr***@infosecs olutions.com.au > wrote in message
news:eb******** *************** ***@posting.goo gle.com... Hi,
This might be a little odd but I need to implement a back/"return to previous page" function from different pages within my asp.net application. The page the back button on has a property that stores an id value that the page i will be returning to will require to display data. The entire application does not use querystrings, and I don't want to use session variables to store this value.
The page also has controls that require validation (that a value exists, numeric etc). If the back button is created and has CausesValidatio n set to True, I obviously get validation errors.
If the back button has CausesValidatio n set to false, the property on the page is automatically destroyed.
Is there a way to implement my back functionality without resorting to querystring or session variables?
Cheers
Greg
Hi Peter,
I've tried your suggestion - the validators still display, overriding
everything.
I did the following (just to confirm):
<asp:button id="btnBack" runat="server" CssClass="size6 0button"
Width="60px" Text="Back" CommandName="Ba ck" CommandArgument ="btnBack"
onCommand="Comm andBtn_Click"></asp:button>
Sub CommandBtn_Clic k(ByVal sender As Object, ByVal e As
CommandEventArg s)
End Sub
Am I missing something?
"Peter Blum" <PL****@Blum.in fo> wrote in message news:<eF******* *******@TK2MSFT NGP15.phx.gbl>. .. Have you tried the properties: CommandName and CommandArg on the button? For example: CommandName="Ba ck" and CommandArg= the ID. Then setup the OnCommand event handler to intercept this click.
--- Peter Blum www.PeterBlum.com Email: PL****@PeterBlu m.com Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"Greg Krzeszkowski" <gr***@infosecs olutions.com.au > wrote in message news:eb******** *************** ***@posting.goo gle.com... Hi,
This might be a little odd but I need to implement a back/"return to previous page" function from different pages within my asp.net application. The page the back button on has a property that stores an id value that the page i will be returning to will require to display data. The entire application does not use querystrings, and I don't want to use session variables to store this value.
The page also has controls that require validation (that a value exists, numeric etc). If the back button is created and has CausesValidatio n set to True, I obviously get validation errors.
If the back button has CausesValidatio n set to false, the property on the page is automatically destroyed.
Is there a way to implement my back functionality without resorting to querystring or session variables?
Cheers
Greg
Greg, you omitted CausesValidatio n=false. You said you don't want to
validate.
Validation will not fire unless Page.Validate() is called. On buttons that
have CausesValidatio n=true, they internally call Page.Validate() just before
calling their Click event. Its actually called within their OnClick method.
All other times, you must call Page.Validate() yourself. So if its
validating, its due to the control having CausesValidatio n=true.
--- Peter Blum www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"Greg Krzeszkowski" <gr***@infosecs olutions.com.au > wrote in message
news:eb******** *************** ***@posting.goo gle.com... Hi Peter,
I've tried your suggestion - the validators still display, overriding everything.
I did the following (just to confirm):
<asp:button id="btnBack" runat="server" CssClass="size6 0button" Width="60px" Text="Back" CommandName="Ba ck" CommandArgument ="btnBack" onCommand="Comm andBtn_Click"></asp:button>
Sub CommandBtn_Clic k(ByVal sender As Object, ByVal e As CommandEventArg s) End Sub
Am I missing something?
"Peter Blum" <PL****@Blum.in fo> wrote in message news:<eF******* *******@TK2MSFT NGP15.phx.gbl>. .. Have you tried the properties: CommandName and CommandArg on the button? For example: CommandName="Ba ck" and CommandArg= the ID. Then setup the OnCommand event handler to intercept this click.
--- Peter Blum www.PeterBlum.com Email: PL****@PeterBlu m.com Creator of "Profession al Validation And More" at http://www.peterblum.com/vam/home.aspx
"Greg Krzeszkowski" <gr***@infosecs olutions.com.au > wrote in message news:eb******** *************** ***@posting.goo gle.com... > Hi, > > This might be a little odd but I need to implement a back/"return to > previous page" function from different pages within my asp.net > application. The page the back button on has a property that stores > an id value that the page i will be returning to will require to > display data. The entire application does not use querystrings, and > I don't want to use session variables to store this value. > > The page also has controls that require validation (that a value > exists, numeric etc). If the back button is created and has > CausesValidatio n set to True, I obviously get validation errors. > > If the back button has CausesValidatio n set to false, the property on > the page is automatically destroyed. > > Is there a way to implement my back functionality without resorting to > querystring or session variables? > > Cheers > > Greg This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Earl Bonovich |
last post by:
This is a repost from my question in the buildcontrol sub group.
----------------
I have created a composite custom control.
It works fine, renders, all is good on that side.
I am trying to cleaup the design mode side of it, and in turn clean up the
core control.
All surounding properties.
|
by: MacDermott |
last post by:
I created a report to print labels, and it created a custom page size for
the report.
When I opened the properties of the printer driver I could see it listed -
as Custom.
Then I had to change printer drivers. (Long story, rather OT.)
When I displayed the report, it was formatted for a full page -
not real useful for mailing labels.
The list of available page sizes did not include Custom.
|
by: Raul M. Colon |
last post by:
I have a web application and need to redirect to a another page. Is there
any way to see the redirected page in a new page? (that's keeping the sending
page visible)
Thanks!!!
Raul
|
by: Jason Zhou |
last post by:
Hi,
I have a question on how to get the previous url in custom error file. Here
is what I am doing:
If someone visit my website with a wrong file name or wrong directory name,
IIS will automatically show error 404 page, this was setup by default in IIS
web site properties/Custom Errors. I replaced that 404b.htm with my aspx
file try to handle this error by myself. the problem is that I can not get
previous url that user requested in...
|
by: Robert |
last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into
some sporadic viewstate errors...usually saying the viewstate is invalid,
eventvalidation failed or mac error.
My web config does specify a machinekey setting:
<machineKey
validationKey="447C05E8B3A71401CC4CAE5513A7F1A3494A3618EE819316AAD1D58433F236A759D66FB4154500E01EB4E1BC1DE42046E2D652D391CB8367A1649438867A02EB"...
| |
by: JohnMOsborn |
last post by:
I am designing an Access database that will use tab controls. Normally, you place different sets of fields on each page of the tab control – like Fields1-3 on Page 1, Fields 4-6 on Page 2, etc. In my database, however, I want to associate a particular numbered record of a field with each separate tab.
In exploring my options, it looks like the best way to do this is to add a record-navigating “On Click” event to each separate page of the...
|
by: Richard |
last post by:
I am new to XML so pardon my ignorance. I have an XML file that is used to
layout an invoice from a program. The problem I am having is I need more
data than the program puts out so is it possible to use a script or
something to query an MS SQL Server database for the additional data. I so
how would you go about this. Any help would be great thanks in advance
Richard
|
by: =?Utf-8?B?TWFyYyBXb29sZnNvbg==?= |
last post by:
Hi,
I think this is a relatively simple problem, but it's starting to annoy me
quite a bit. I have two issues with a custom Web Part that I have created,
both related to property editing at run time using an EditorZone.
One of my web parts contains a control which displays information for a
particular (default) user. The user should have the ability to select an
alternate user whose information should be displayed in the control, and...
|
by: in10se |
last post by:
I have a .NET 2.0 application that uses the WebBrowser control. Because all of my pages are generated dynamically, I am catching the Navigating event, cancelling it, and performing my own operations based on the Uri that is passed in the WebBrowserNavigatingEventArgs.Url property. If the page is requesting an external URL, I would like to open the page in a new browser window.
When requesting an external page, the URL is of the form:...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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,...
|
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...
|
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...
|
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();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |