I have created a new Visual WebPart with custom webpart property that deployed successfully, but when adding the Visual WebPart to my Page and editing its properties, I noted that the custom webpart property is not shown
It's my code to add a custom property in Visual WebPart
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
namespace WPs.ContactForm {
public partial class ContactFormUserControl: UserControl {
[WebBrowsable(true),
WebDisplayName("UserName"),
WebDescription("Enter User Name"),
Personalizable(PersonalizationScope.Shared),
Category("Mail Settings")
]
public string username {
get;
set;
}
}
}
How I can show a custom property in Visual WebPart?