Well here you go for Edit/Insert mode try this:
[MetadataType(typeof(EmployeeMD))]
public partial class Employee
{
public class EmployeeMD
{
public object EmployeeID { get; set; }
public object Name { get; set; }
[DisplayName("Password")] //makes column title not split
[DataType(DataType.Password)]
public object password { get; set; }
}
}and in Text_Edit.aspx.cs add this to the Page_Load:
var password = Column.Attributes.OfType<DataTypeAttribute>().FirstOrDefault();
if (password != null && password.DataType == DataType.Password)
{
TextBox1.TextMode = TextBoxMode.Password;
}
You will need to do something a bit more in the Text.ascx FieldTemplate.
Steve

Always seeking an elegant solution.
[Oh! If olny I colud tpye!]
c# Bits blogOh, and don't forget to mark as answer any posts that help you
