i have login window and id password is save on browser.
i want to clear password when page load and restrict to login with save credential.
textmode=password.
Please give resolution if you have in vb.net.
Loading
i have login window and id password is save on browser.
i want to clear password when page load and restrict to login with save credential.
textmode=password.
Please give resolution if you have 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.
Tuhin PaulPosted Mar 10, 2024, 5:30 PM
In VB.NET, you can achieve this by utilizing JavaScript to clear the password field when the page loads and preventing the browser from autofilling the saved credentials. Add a JavaScript function to clear the password field
Add the JavaScript function to your ASPX page or include it in a separate JavaScript file
Amit MohantyPosted Mar 4, 2024, 7:49 AM
Set the AutoCompleteType attribute of the password textbox to Disabled, instructing the browser not to autocomplete the password field. Add the below script to Page_load
rupesh gourPosted Mar 4, 2024, 7:48 AM
its working.
but i select again username password is get filled because save on browser.
Jithu ThomasPosted Mar 4, 2024, 7:48 AM
VB.net code will clear the text box. why JS. please refer the snippet which i send before.
rupesh gourPosted Mar 4, 2024, 7:43 AM
JS is also try to clear textbox value nothing else
Jithu ThomasPosted Mar 4, 2024, 7:41 AM
i dont understand what is the need of this javascript function. please share the logic of the javascript.
the same is working for me.
rupesh gourPosted Mar 4, 2024, 7:37 AM
already added still not work
Jithu ThomasPosted Mar 4, 2024, 7:33 AM
include this snippet in the front end code.
check this as the addition of
autocomplete="new-password"to the passwordTextBox, thisattribute helps prevent browsers from automatically filling in the password field.rupesh gourPosted Mar 4, 2024, 7:29 AM
password text box is not clearing.
Actually password is saved on browser .
i also use javascript
rupesh gourPosted Mar 4, 2024, 7:26 AM
this is not working..
Jithu ThomasPosted Mar 4, 2024, 7:24 AM
Kindly follow this code in the backend will resolve your issue.