How to disable Chrome's saved password prompt setting through JavaScript or any other process from code in vb.net
Loading
How to disable Chrome's saved password prompt setting through JavaScript or any other process from code in vb.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
rupesh gourPosted Mar 7, 2024, 10:26 AM
TextBox1.AutoCompleteMode = AutoCompleteMode.None TextBox2.AutoCompleteMode = AutoCompleteMode.None
where to add this
rupesh gourPosted Mar 7, 2024, 10:23 AM
password type shoul be password then??
Jayraj ChhayaPosted Mar 7, 2024, 9:13 AM
Hi rupesh gour,
Try below code
To disable the browser's saved password prompt in Chrome using JavaScript, you can utilize the
autocompleteattribute in the input fields. By settingautocomplete="off", you can prevent the browser from suggesting saved passwords for those fields.In a VB.NET application, you can achieve a similar effect by setting the
AutoCompleteModeproperty of the textboxes toNone.you can effectively disable the saved password prompt in Chrome within your VB.NET application.
Vishal JoshiPosted Mar 7, 2024, 8:42 AM
Hello Rupesh
Please change type "Password" to "Text", provide css to convert text to password. please find the below sample code.
Thanks
Vishal Joshi
rupesh gourPosted Mar 7, 2024, 6:08 AM
not work
Naimish MakwanaPosted Mar 7, 2024, 6:02 AM
I understand that the
type=passwordattribute is mandatory in your case. Here are a few more suggestions:nameattribute. You can initially set the input field without anameattribute to prevent the password save prompt. Just before form submission, you can add thenameattribute back using JavaScript1.Here’s an example:
Thanks.
rupesh gourPosted Mar 7, 2024, 5:57 AM
type=password is mandatory ,
this solution not working please share if more idea.
Naimish MakwanaPosted Mar 7, 2024, 5:52 AM
Disabling Chrome’s saved password prompt setting through JavaScript can be achieved by manipulating the input fields in your HTML form. Here are a few methods:
autocomplete="off"orautocomplete="new-password"to your form or input fields34. However, note that some modern browsers ignore theautocomplete="off"setting for password fields3.Please note that these methods might not work in all cases as browser behavior can vary and change over time. Also, manipulating these settings can lead to a less user-friendly experience, as it interferes with the browser’s built-in functionality designed to make users’ lives easier.
As for VB.NET, it’s a server-side language and doesn’t have direct control over client-side behavior such as browser prompts. You would need to use client-side code (like the JavaScript examples above) to manipulate browser behavior.
Thanks.