Selectively turn on/turn off autocomplete functionality using ASP.NET based on userId

Using ASP.NET (1.1. framework).  Needed to turn off or turn on autocomplete login functionality based on the userid/for certain users.   So if autocomplete is on, you should get that 'do you want IE to remember this password ..' message.  Am using regular server-side ASP.NET textboxes (for userid and password).

Users whose autocomplate be turned off -  i) Whose 1st 3 characters of loginid = 'foo' ii) Need to make a database call to the User table and check for a certain field (server-side logic).

Guessing this has to be done on client-side, as that autocomplete message shows up, as soon as you click on the login button. Any ideas ?
tapdev72Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

muhammadyasirCommented:
use cookies.
0
Jens FiedererTest Developer/ValidatorCommented:
The  'do you want IE to remember this password ..'  is a feature of the browser, not any of your code.

The user can control this setting by, for example on IE8, using Tools | Internet Options  | Content | AutoComplete.

This is not under your control as an ASP.NET programmer.  If these are users that are under your complete control, you might be able to force them to run something on their computers that forces this setting.

Alternatively, as muhammad suggested, you can implement similar functionality yourself in ASP.NET, using cookies.  The first time your user logs on, if he is one of those you want to "autocomplete", you store the username in a cookie on his client  (or some key information that allows you to retrieve it).  On subsequent calls to your page, fill in the loginid with the value you found in (or derived from) the cookie before sending it to the user.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tapdev72Author Commented:
Some code sample would have been nice. I was expecting a solution from some expert, making an xmlhttp call in .NET 1.1. Only 2 people responded.
0
Jens FiedererTest Developer/ValidatorCommented:
The simple answer to your question is just "It's impossible."  

We were suggesting alternate approaches.  Code samples aren't very relevant until an approach has been decided on.
0
Jens FiedererTest Developer/ValidatorCommented:
(It's impossible, that is, to turn on BROWSER'S autocomplete functionality, which is what the original question sounded like - you can certainly provide your own - and although now it sounds you were hoping for an AJAX approach, you didn't tell us that - sometimes you have to respond to clarify your request before you accept an answer)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.