More in this section

Forums / Developing with Sitefinity / How to set Textmode Password

How to set Textmode Password

4 posts, 0 answered
  1. thomas3577
    thomas3577 avatar
    22 posts
    Registered:
    18 Feb 2007
    27 Sep 2009
    Link to this post
    The Property...

    [Browsable(true),   
    DisplayName("Password")]   
    public string SmtpUserPassword { getset; } 

    ...to set the Password for a SMTP-Server.

    The Textmode is not set to "Password". How can I change it?

     

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    27 Sep 2009
    Link to this post
    Hello thomas3577,

    Please give a try to the following sample

      [DisplayName("Password")] 
        public string SmtpUserPassword 
        { 
            get { return smtpPassword; } 
            set { smtpPassword = value; } 
        } 
        private string smtpPassword; 


    For more information, please take a look at MSDN. Just to let you know Browsable attribute is always true by default, so you do not need to add it.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. thomas3577
    thomas3577 avatar
    22 posts
    Registered:
    18 Feb 2007
    28 Sep 2009
    Link to this post
    Hm... sorry for my bad english. One try again...

    The Password-Textbox is a SingleLine Textbox:
    Sample => http://img10.yfrog.com/i/isti.png/

    And i want this:
    http://img10.imageshack.us/i/soll.png/

    :-)

    How can i do this.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    29 Sep 2009
    Link to this post
    Hi thomas3577,

    It is not possible to set the input field of type password. You could create a custom designer for your control inheriting from ControlDesigner class and overriding LayoutTemplatePath property to set a custom template for the Basic Tab. Then you can expose the property as password field. You may find the following article useful Making Control Editing User-Friendly with Sitefinity Control Designers

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered