-
Jan 22nd, 2025, 06:05 AM
#1
Thread Starter
Hyperactive Member
Disable autocomplete in chrome
i have a textbox txtAddress i want to disable the autocomplete for this textbox
i tried the below but nothing is working :
HTML Code:
<asp:TextBox ID="txtAddress" runat="server" CssClass="form-control" AutoCompleteType="none" autocomplete="false"
TextMode="MultiLine" Rows="4" MaxLength="500" placeholder="Enter Address"
ValidationGroup="RegisterGrp">
Code:
txtAddress.Attributes.Add("autocomplete", "off")
txtAddress.Attributes.Add("AutoCompleteType", "text")
none of the above is working.
actually i have a textbox txtTags which is working fine the tags are getting separated with comma but as soon as the txtaddress is being autofill from the chrome autofill the formatting of txttags disappears and it gets converted to a normal textbox.
pls. guide.
thanks in advance.
The only time you run out of chances is when you stop taking them.
The mind is like a parachute.
It doesn’t work unless it’s open.
-
Jan 22nd, 2025, 06:25 AM
#2
Re: Disable autocomplete in chrome
This is not a .net question it's an asp question posted in the wrong forum.
anyway, remove this AutoCompleteType="none" and change to autocomplete="off" , or do not specify on the control and simple add the attribute.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jan 22nd, 2025, 08:33 AM
#3
Thread Starter
Hyperactive Member
Re: Disable autocomplete in chrome
 Originally Posted by sapator
This is not a .net question it's an asp question posted in the wrong forum.
sorry. is there any way i can move it to asp ?
 Originally Posted by sapator
anyway, remove this AutoCompleteType="none" and change to autocomplete="off" , or do not specify on the control and simple add the attribute.
i tried this but still not working
The only time you run out of chances is when you stop taking them.
The mind is like a parachute.
It doesn’t work unless it’s open.
-
Jan 22nd, 2025, 08:43 AM
#4
Re: Disable autocomplete in chrome
 Originally Posted by kuldevbhasin
sorry. is there any way i can move it to asp ?
That looks like an asp.net application to me, so it is probably in the correct place.....
 Originally Posted by kuldevbhasin
i tried this but still not working
Looking online the autocomplete="false" should do the trick, however it seems this is generally being ignored by a lot of modern browsers, chrome included. You might be fighting a losing battle on this one unfortunately...
-
Jan 22nd, 2025, 09:20 AM
#5
Re: Disable autocomplete in chrome
What?
It's asp.net , so it should be moved to the asp.net forum.
Asking an admin will do that. I'm not sure false works with an asp.net textbox , I do not see a method that is enable in the markup, so your best bet is to add it from the attributes , or just leave AutoCompleteType="none" because writting autocomplete at the control declaration might be messing with the control.
Or if nothing works try to use <ajaxToolkit:AutoCompleteExtender > (it's an ajax control.
Edit. Just saw that AutoCompleteType is probably irrelevant so ignore that.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jan 23rd, 2025, 10:46 AM
#6
Thread Starter
Hyperactive Member
Re: Disable autocomplete in chrome
hi
It's asp.net , so it should be moved to the asp.net forum.
by mistake i had posted this in vb.net and has been moved now hence the confusion
The only time you run out of chances is when you stop taking them.
The mind is like a parachute.
It doesn’t work unless it’s open.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|