473,769 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please! Doesn't anyone know a better way to do this?

Hi All :-)

I am desperately looking for some help/information on how to direct page
flow. Forget what I have done - here's what I need to do:

I have a large ASPX.Net - VB.Net web application (around 35-40 pages) that
once the user logs in, I need to direct them to the correct page, depending
on what they select from the directory. In other words...when they login,
if they are a new user, a new account screen comes up and from there a
series of screens need to be entered in a specific order. Then, depending
on what they select after they have completed the new account info, the flow
needs to direct them from the entry screens to invoices, payments,
electronic signature and receipts pages.

I know this can be done, we do it all the time when doing things such as
ordering books, or any type of on-line shopping. I currently am using
Session State (variables) and pass them from the directory page to the page
called. The problem with this is that we also have a JavaScript Drop-down
menu and the variables don't get set if they select a page from the drop
down. How do I overcome this limitation? Isn't there a better way to do
this?

Please Help! Any info would be GREATLY appreciated!

TIA,

Coleen
Sep 5 '06 #1
9 1888
Have you looked at the Wizard server control? HTH.
David
"Coleen" <co**********@y ahoo.comwrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
Hi All :-)

I am desperately looking for some help/information on how to direct page
flow. Forget what I have done - here's what I need to do:

I have a large ASPX.Net - VB.Net web application (around 35-40 pages) that
once the user logs in, I need to direct them to the correct page,
depending
on what they select from the directory. In other words...when they login,
if they are a new user, a new account screen comes up and from there a
series of screens need to be entered in a specific order. Then, depending
on what they select after they have completed the new account info, the
flow
needs to direct them from the entry screens to invoices, payments,
electronic signature and receipts pages.

I know this can be done, we do it all the time when doing things such as
ordering books, or any type of on-line shopping. I currently am using
Session State (variables) and pass them from the directory page to the
page
called. The problem with this is that we also have a JavaScript Drop-down
menu and the variables don't get set if they select a page from the drop
down. How do I overcome this limitation? Isn't there a better way to do
this?

Please Help! Any info would be GREATLY appreciated!

TIA,

Coleen


Sep 5 '06 #2
Coleen,

I'm having trouble understanding exactly what you want to do, but from
what I gather, you need to know when a new user comes in and handle
them differently than an existing user. Let's break down your request,
with some additional questions inline.
>...when they login,
if they are a new user, a new account screen comes up
I assume here that you're checking a database when the user attempts to
login and if the user isn't found you want to redirect to the "new user
signup" -or- the user clicks a "register" button to get to the signup
page. Correct?
>from there a
series of screens need to be entered in a specific order.
You have a "wizard type" progression that you want to perform here?

Then, depending
on what they select after they have completed the new account info, the flow
needs to direct them from the entry screens to invoices, payments,
electronic signature and receipts pages.
You want the choices they've made to dictate where they are sent
afterwards, and these options are saved in the database with each user
account?
>I currently am using
Session State (variables) and pass them from the directory page to the page
called. The problem with this is that we also have a JavaScript Drop-down
menu and the variables don't get set if they select a page from the drop
down. How do I overcome this limitation? Isn't there a better way to do
this?
This kinda sounds like you're not storing the user's options in the
database, please correct me if I'm wrong.

-------------------------------------------------------------

Here's how I'd attack this if it were my problem. There are many ways
to do it, but this is my OPINION (as I don my flame retardant gear).

When a new user attempts to login or clicks to register, I'd redirect
them to my new user signup. I'd use server-side HTML tables to house
each "page" of the signup process (all on one aspx page), and control
the user's progress with a hidden textbox's value. I'd use next and
back buttons to increment the hidden textbox's value. I'd use a Select
Case on that value in the code-behind to determine which table needed
to be visible (only 1 table "Page" visible at a time).

For instance:
(HTML)
<Table id=tblSignUp1 runat=server>
[Sign up Procedure - Page 1 (Your HTML for Page 1)]
</Table>
<Table id=tblSignUp2 runat=server visible=False>
[Sign up Procedure - Page 2 (Your HTML for Page 2)]
</Table>
<Table id=tblSignUp3 runat=server visible=False>
[Sign up Procedure - Page 3 (Your HTML for Page 3)]
</Table>
<asp:button id=btnNext text="Next" runat=server></asp:button>
<asp:button id=btnBack text="Back" runat=server></asp:button>
<input type=hidden name="txtStep">

(code-behind in PageLoad of Signup.aspx)
Dim myStepNum as Int16
myStepNum = Cint(Request.Pa rameters("txtSt ep"))

Select Case myStepNum
Case 1 'Display page 1
tblSignUp1.Visi ble = True
tblSignUp2.Visi ble = False
tblSignUp3.Visi ble = False
Case 2 'Display page 2
tblSignUp1.Visi ble = False
tblSignUp2.Visi ble = True
tblSignUp3.Visi ble = False
Case 3 'Display page 3
tblSignUp1.Visi ble = False
tblSignUp2.Visi ble = False
tblSignUp3.Visi ble = True
End Select

When the user clicks "DONE", I'd insert a new record into the DB and
(in a separate table) add all the user's options. I'd then redirect
the user back to the login page. The login procedure should add the
user's ID to Context.Session .Item("user_id" ) - [from the DB during
login if the user is validated]

Then, I would create a class called usersettings. On each page load,
I'd instantiate the usersettings class and load all the user's info
into my class variable through a query to the database based upon my
Context.Session .Item("user_id" ) value. I'd create a method to handle
this population.

Something like this:
[Class]
Public Class usersettings
Public Structure oUser
Public UID as int16
Public setting1 as string
Public setting2 as string
End Structure

Public Function GetSettings(ByV al user_id as Int16) as oUser
Dim currentUser as oUser
[connect to database and retrieve settings]
currentUser.UID = user_id
currentUser.set ting1 = myDataView(0).R ow("Setting1")
...
Return currentUser
End Function
End Class

[Page Load]
Dim tmp as New usersettings
Dim myUser as oUser
myUser = tmp.GetUserInfo (Context.Sessio n.Item("user_id "))
tmp = Nothing

This way, I have all the user info at my disposal before anything else
on the page happens. You could probably do this in Global.asax in the
BeginRequest event too. I'll leave that for later.

Not sure how the java menu's will affect this approach because I don't
use them.

Maybe this is a start for you, maybe I'm completely off base as far as
the questions you asked, and maybe someone will tell me that this is a
horrible approach, but I've used this successfully in the past. The
code included wasn't compiled and is really just a Psuedo-code example.

Let me know if it helps. Good luck

dkb

Sep 5 '06 #3
Well you've got it partially right. We will be storing the user's name &
password (right now the application is set up as a "Demo") What I'm trying
to do is direct the user from page to page - i.e., after the user sets up an
account, they need to automatically be directed to the page to enter data
for the fleet (this is a Fleet vehicle registration application) and after
they enter the fleet info they need to be directed to the vehicle
registration section. This is actually quite easy the way that I'm doing it
with Session Variables (in the directory if they chose Add Account I set a
session variable on the Account page (Session("page_ name"). This session
variable gets changed as they flow from window to window using the Next
button. If they use the JavaScript drop-down menu instead, the session
variable doesn't get set and the next page doesn't "know" where it was
called from...does that make more sense? I'm using .Net 1.1 right now but
we are (supposed) to be upgrading to .Net 2005 (ASPX 2.0). I just can't
think of a better way to "tell" my pages which page the call originated
from...is there another way that the JavaScript menus won't interfere with?
Thanks very much for any/all help :-)
"Dblood" <db*********@in finitechs.comwr ote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
Coleen,

I'm having trouble understanding exactly what you want to do, but from
what I gather, you need to know when a new user comes in and handle
them differently than an existing user. Let's break down your request,
with some additional questions inline.
...when they login,
if they are a new user, a new account screen comes up

I assume here that you're checking a database when the user attempts to
login and if the user isn't found you want to redirect to the "new user
signup" -or- the user clicks a "register" button to get to the signup
page. Correct?
from there a
series of screens need to be entered in a specific order.

You have a "wizard type" progression that you want to perform here?

Then, depending
on what they select after they have completed the new account info, the
flow
needs to direct them from the entry screens to invoices, payments,
electronic signature and receipts pages.

You want the choices they've made to dictate where they are sent
afterwards, and these options are saved in the database with each user
account?
I currently am using
Session State (variables) and pass them from the directory page to the
page
called. The problem with this is that we also have a JavaScript
Drop-down
menu and the variables don't get set if they select a page from the drop
down. How do I overcome this limitation? Isn't there a better way to
do
this?

This kinda sounds like you're not storing the user's options in the
database, please correct me if I'm wrong.

-------------------------------------------------------------

Here's how I'd attack this if it were my problem. There are many ways
to do it, but this is my OPINION (as I don my flame retardant gear).

When a new user attempts to login or clicks to register, I'd redirect
them to my new user signup. I'd use server-side HTML tables to house
each "page" of the signup process (all on one aspx page), and control
the user's progress with a hidden textbox's value. I'd use next and
back buttons to increment the hidden textbox's value. I'd use a Select
Case on that value in the code-behind to determine which table needed
to be visible (only 1 table "Page" visible at a time).

For instance:
(HTML)
<Table id=tblSignUp1 runat=server>
[Sign up Procedure - Page 1 (Your HTML for Page 1)]
</Table>
<Table id=tblSignUp2 runat=server visible=False>
[Sign up Procedure - Page 2 (Your HTML for Page 2)]
</Table>
<Table id=tblSignUp3 runat=server visible=False>
[Sign up Procedure - Page 3 (Your HTML for Page 3)]
</Table>
<asp:button id=btnNext text="Next" runat=server></asp:button>
<asp:button id=btnBack text="Back" runat=server></asp:button>
<input type=hidden name="txtStep">

(code-behind in PageLoad of Signup.aspx)
Dim myStepNum as Int16
myStepNum = Cint(Request.Pa rameters("txtSt ep"))

Select Case myStepNum
Case 1 'Display page 1
tblSignUp1.Visi ble = True
tblSignUp2.Visi ble = False
tblSignUp3.Visi ble = False
Case 2 'Display page 2
tblSignUp1.Visi ble = False
tblSignUp2.Visi ble = True
tblSignUp3.Visi ble = False
Case 3 'Display page 3
tblSignUp1.Visi ble = False
tblSignUp2.Visi ble = False
tblSignUp3.Visi ble = True
End Select

When the user clicks "DONE", I'd insert a new record into the DB and
(in a separate table) add all the user's options. I'd then redirect
the user back to the login page. The login procedure should add the
user's ID to Context.Session .Item("user_id" ) - [from the DB during
login if the user is validated]

Then, I would create a class called usersettings. On each page load,
I'd instantiate the usersettings class and load all the user's info
into my class variable through a query to the database based upon my
Context.Session .Item("user_id" ) value. I'd create a method to handle
this population.

Something like this:
[Class]
Public Class usersettings
Public Structure oUser
Public UID as int16
Public setting1 as string
Public setting2 as string
End Structure

Public Function GetSettings(ByV al user_id as Int16) as oUser
Dim currentUser as oUser
[connect to database and retrieve settings]
currentUser.UID = user_id
currentUser.set ting1 = myDataView(0).R ow("Setting1")
...
Return currentUser
End Function
End Class

[Page Load]
Dim tmp as New usersettings
Dim myUser as oUser
myUser = tmp.GetUserInfo (Context.Sessio n.Item("user_id "))
tmp = Nothing

This way, I have all the user info at my disposal before anything else
on the page happens. You could probably do this in Global.asax in the
BeginRequest event too. I'll leave that for later.

Not sure how the java menu's will affect this approach because I don't
use them.

Maybe this is a start for you, maybe I'm completely off base as far as
the questions you asked, and maybe someone will tell me that this is a
horrible approach, but I've used this successfully in the past. The
code included wasn't compiled and is really just a Psuedo-code example.

Let me know if it helps. Good luck

dkb

Sep 5 '06 #4
Colleen,

Here something to try, create a String variable (I'll call it
strRefUrl) then in Page Load, assign it: strRefUrl =
Request.UrlRefe rrer, the result SHOULD be the url of the page you just
left. You'll have to parse the page name out by doing some string
manipulation, but it should be easy enough with the InStrRev() function
looking for the first "/" character (because we're going right to left)
and then using the Mid() function to pull out the page name. Assign
that to your Session variable and then proceed as normal. Again, I
don't know if the Java buttons are going to affect this, but it's worth
a try.

If the string stuff holds you up, post the page url and I'll write the
code to parse the string.

dkb

Sep 5 '06 #5
DKB - Thank you so much for the suggestion. Let me try the string stuff
myself - I'm going to play with it for a few days - I'm stuck waiting for
the upgrade to .Net 2005 before I can do a whole lot on this right now, but
at least this gets me started! Thanks, I really appreciate the help!
Sometimes you just need another view on how to do things...

Coleen
"Dblood" <db*********@in finitechs.comwr ote in message
news:11******** *************@h 48g2000cwc.goog legroups.com...
Colleen,

Here something to try, create a String variable (I'll call it
strRefUrl) then in Page Load, assign it: strRefUrl =
Request.UrlRefe rrer, the result SHOULD be the url of the page you just
left. You'll have to parse the page name out by doing some string
manipulation, but it should be easy enough with the InStrRev() function
looking for the first "/" character (because we're going right to left)
and then using the Mid() function to pull out the page name. Assign
that to your Session variable and then proceed as normal. Again, I
don't know if the Java buttons are going to affect this, but it's worth
a try.

If the string stuff holds you up, post the page url and I'll write the
code to parse the string.

dkb

Sep 5 '06 #6
Coleen,

Oops. It should be Request.URL.Ref errer.ToString.

You;d have figured that out, I'm sure, but I feel better now that I
didn't give you bum info.

dkb

Sep 5 '06 #7
You're wasting your time using 1.1 because everything you need to do is
built into 2.0; the Wizard control and Membership, Roles and Profiles all of
which make it possible for the business rules your working with rather easy
to build.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee. com
URL http://clintongallagher.metromilwaukee.com/
MAP 43°2'17"N 88°2'37"W : 43°2'17"N 88°2'37"W

"Coleen" <co**********@y ahoo.comwrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
Hi All :-)

I am desperately looking for some help/information on how to direct page
flow. Forget what I have done - here's what I need to do:

I have a large ASPX.Net - VB.Net web application (around 35-40 pages) that
once the user logs in, I need to direct them to the correct page,
depending
on what they select from the directory. In other words...when they login,
if they are a new user, a new account screen comes up and from there a
series of screens need to be entered in a specific order. Then, depending
on what they select after they have completed the new account info, the
flow
needs to direct them from the entry screens to invoices, payments,
electronic signature and receipts pages.

I know this can be done, we do it all the time when doing things such as
ordering books, or any type of on-line shopping. I currently am using
Session State (variables) and pass them from the directory page to the
page
called. The problem with this is that we also have a JavaScript Drop-down
menu and the variables don't get set if they select a page from the drop
down. How do I overcome this limitation? Isn't there a better way to do
this?

Please Help! Any info would be GREATLY appreciated!

TIA,

Coleen


Sep 6 '06 #8
Thank you! I get my new "Test" machine today, so I should now be able to
test this in ASP.Net 2 :-D

"Dblood" <db*********@in finitechs.comwr ote in message
news:11******** *************@e 3g2000cwe.googl egroups.com...
Coleen,

Oops. It should be Request.URL.Ref errer.ToString.

You;d have figured that out, I'm sure, but I feel better now that I
didn't give you bum info.

dkb

Sep 6 '06 #9
I know! I've been nagging at our Management for months to complete the
upgrade - I finally got news this morning that I will get the "Test" machine
today and I can start testing the move of our application and can really
start to accomplish something now! Yay!!!

Thanks :-)

Coleen

"clintonG" <cs*********@RE MOVETHISTEXTmet romilwaukee.com wrote in message
news:%2******** *******@TK2MSFT NGP05.phx.gbl.. .
You're wasting your time using 1.1 because everything you need to do is
built into 2.0; the Wizard control and Membership, Roles and Profiles all
of
which make it possible for the business rules your working with rather
easy
to build.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee. com
URL http://clintongallagher.metromilwaukee.com/
MAP 43°2'17"N 88°2'37"W : 43°2'17"N 88°2'37"W

"Coleen" <co**********@y ahoo.comwrote in message
news:OQ******** ******@TK2MSFTN GP05.phx.gbl...
Hi All :-)

I am desperately looking for some help/information on how to direct page
flow. Forget what I have done - here's what I need to do:

I have a large ASPX.Net - VB.Net web application (around 35-40 pages)
that
once the user logs in, I need to direct them to the correct page,
depending
on what they select from the directory. In other words...when they
login,
if they are a new user, a new account screen comes up and from there a
series of screens need to be entered in a specific order. Then,
depending
on what they select after they have completed the new account info, the
flow
needs to direct them from the entry screens to invoices, payments,
electronic signature and receipts pages.

I know this can be done, we do it all the time when doing things such as
ordering books, or any type of on-line shopping. I currently am using
Session State (variables) and pass them from the directory page to the
page
called. The problem with this is that we also have a JavaScript
Drop-down
menu and the variables don't get set if they select a page from the drop
down. How do I overcome this limitation? Isn't there a better way to
do
this?

Please Help! Any info would be GREATLY appreciated!

TIA,

Coleen


Sep 6 '06 #10

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

Similar topics

1
2283
by: Ex-Em-El | last post by:
can anybody give / send me an example of tree view with tables that the user can choose which one(table) to present .? like : base - table + tableName + tableName + tableName
2
1172
by: cpptutor2000 | last post by:
Could some C++ guru please help me ? I am using gcc 3.2.3 and I am trying to invoke some functions defined in a C file from inside a C++ class, and I keep getting linker error messages 'undefined reference such - such function'. Both the C file and the C++ class are in the same directory. Could someone please point out what might be going wrong? Any help would be greatly appreciated.
3
2448
by: Mark Broadbent | last post by:
could somebody please recommend a good book to prepare for exam Exam 70-320*: Developing XML Web Services and Server Components with Microsoft Visual C# and the Microsoft .NET Framework . One that you have read please that you recommend. Also any suggestions for a decent ADO.NET book (C# orientated) would be good. Thanks in advance.
31
1684
by: Simply_Red | last post by:
i'm sorry i posted this in other groupes, and i didn't see it, and as this group is most actif, i repost it here, and sorry for mutliposting: Hi, i'm using VC6, i have this declaration: typedef struct tagTLimite { double Debut; double Fin;
4
1710
by: Jui.Acharya | last post by:
Hi, Please help me out... I found one deficalty with defining classes in C+ +... can u please help me out... Thanks Jui
2
3966
by: karafire2003 | last post by:
I've been tasked to do 2 questions. I think i got the majority of it done, but i'm having trouble. Question #1: Write a C program that accepts as input from the keyboard a floating point number, an integer, and a character. Each of these inputs should be preceded by a prompt and stored using individual variable names. Have your program call a function that assembles the input data into a single string. Display the assembled string using the...
2
1930
by: Unpopular | last post by:
void directory::modification()//??????????? { clrscr(); cout<< "\n\t @@@@@@ @@@@@ @@@@@ @@@@@@ @@@@@ @ @ @@@@@@ "; cout<< "\n\t=====@ @ @ @ @ @ @@ @ @ ====="; cout<< "\n\t=====@@@@@@ @ @ @ @ @ @ @ @ @ @@@ =====";
2
2445
by: clouddragon | last post by:
Hi, i am in desperate need for any help regarding one of my assignments. I am to write a python program that lists the numbers that are composite from 1 to n(input) and write it to an external txt. I was able to write something that checks whether something is composite or not but able to incorporate it into a loop as such. for example: n = 50 then the composite numbers are 4 6
1
2376
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, I have a webpage designed with asp.net 2.0. Is there a way to display a "please wait" message to the screen horizontally centered and veritcally 20px from the VISIBLE top of the page, regardless of what kind of scrolling the user has done? I am currently displaying a "please wait" message (the DIV section shown below, which i'm showing/hiding) when the user clicks save, but the user is
0
9587
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, 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...
0
9423
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
10211
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, 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...
1
9993
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
6672
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
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
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.