Click to See Complete Forum and Search --> : Asp login check with javascript


ss_learner
05-11-2005, 04:14 AM
Hi there
Can any one help me out

I have a new user addition page in asp
After the user enters login and password, I should add them to the database,
but need to check whether the login exists or not.
If it exists, then i need to redirect him to the newuser.asp page saying that the loginname already exists
but my problem is, asp cannot hold the view state, so when i redirect, or say history.go etc, all the fields are empty..
is there anyother way of doing.??
I saw an article in a website to check for the entered name etc in database using javascripting, but unfortunately i could not find it now (I forgot to bookmark it)
Should I use the session variables or anyother way??

Thanks and regards

buntine
05-11-2005, 04:51 AM
You could use a session variable or cookie (not a whole lot of differance) to place the values back into the form controls. You could also use the QueryString by appending the entered form values onto the URL when you are redirecting. But this is only wise if your form does not contain a huge amount of data as the queryString has a limit.

For a JavaScript solution, you will need to ask in the JavaScript forum.

Regards.

wmif
05-11-2005, 07:19 PM
using javascript to go back in the history is relying on the browser to pull from its cache. you will not get consistent results using this method. its best to use suggestions above.

phpnovice
05-12-2005, 07:45 AM
I saw an article in a website to check for the entered name etc in database using javascripting, but unfortunately i could not find it now (I forgot to bookmark it)
It's called an XMLHttpRequest (http://www.google.com/search?hl=en&lr=&q=XMLHttpRequest).