Results 1 to 6 of 6

Thread: Disable autocomplete in chrome

  1. #1

    Thread Starter
    Hyperactive Member kuldevbhasin's Avatar
    Join Date
    Mar 2008
    Location
    Mumbai, India
    Posts
    493

    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.

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,727

    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.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3

    Thread Starter
    Hyperactive Member kuldevbhasin's Avatar
    Join Date
    Mar 2008
    Location
    Mumbai, India
    Posts
    493

    Re: Disable autocomplete in chrome

    Quote Originally Posted by sapator View Post
    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 ?

    Quote Originally Posted by sapator View Post
    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.

  4. #4
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,813

    Re: Disable autocomplete in chrome

    Quote Originally Posted by kuldevbhasin View Post
    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.....

    Quote Originally Posted by kuldevbhasin View Post
    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...

  5. #5
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,727

    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.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  6. #6

    Thread Starter
    Hyperactive Member kuldevbhasin's Avatar
    Join Date
    Mar 2008
    Location
    Mumbai, India
    Posts
    493

    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
  •  



Click Here to Expand Forum to Full Width