General discussion

Locked

help in asp

By vijaym_s ·
i waant to create a login page in asp. the page will have a login name and password. when a operator types the username and password . when the operator takes an order from the cutomer the login name should appear automatically in the order form( the orderform is already created) . if the customer makes a compliant .inthe complaint form also the login name of the operator
should appear auomatically
reply soon

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

help in asp

by vijaym_s In reply to help in asp

Point value changed by question poster.

Collapse -

help in asp

by me In reply to help in asp

>> i waant to create a login page in asp.
>> the page will have a login name and
>> password.

You could refer to article entitled "Creating a Database-Driven Login Page" at
http://www.4guysfromrolla.com/webtech/021600-1.shtml


>> whena operator types the username and
>> password . when the operator takes an
>> order from the cutomer the login name
>> should appear automatically in the order
>> form( the orderform is already created) .
>> if the customer makes a compliant .inthe
>> complaint form also the login name of the
>> operator should appear auomatically
>> reply soon

when your system has authenticated a user using the sample code in that website, you need to assign the UserName value to session variable, e.g

<%
session("username") = strUsername
%>

after that to display the session("username") value on any pages later, you use:

<%
response.write "your username is: " & session("username")
%>

Hope that may help.

Hadzramin

Collapse -

help in asp

by vijaym_s In reply to help in asp

Poster rated this answer

Collapse -

help in asp

by andrew In reply to help in asp

Using session variables is an easy technique, but you should be aware that it does not scale.

If you're not prepared to use a scalable state management system (storing data in a common database), there are 3 other methods open to you:

1: Cookies. You could set a cookie on the client that contains the current UserName.
<%Response.Cookies("UserName")=username%>

2: QueryString. You can pass the current UserName (or ID to save space) back to the server when new pages are requested.
<Formname=Form1 action=NewPage.asp?UserID=<%=userID%> method=get>

3: Hidden Form Field. Store the UserName in a hidden text field, and when the form is posted, the next asp page can pick up the value if necessary.
<input type=hidden name=UserName value=<%=username%>

Depending on the needs of your app (number of users, forms, transactions) you have 4 methods to choose from.

Good luck.

Collapse -

help in asp

by vijaym_s In reply to help in asp

Poster rated this answer

Collapse -

help in asp

by vijaym_s In reply to help in asp

This question was closed by the author

Back to Web Development Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums