How to get border style name list in asp.net

Under the source page of aspx,



< asp:Label
ID="Label1"
runat="server"
Font-Bold="true"
Text="Border Style"
ForeColor="DodgerBlue"
>
< /asp:Label >
< br />
< asp:ListBox
ID="ListBox1"
runat="server"
BackColor="DodgerBlue"
ForeColor="AliceBlue"
>
< /asp:ListBox >


Under the aspx.cs page,




protected void Page_Load(object sender, System.EventArgs e) {
if(!this.IsPostBack)
{
string[] borderStyleArray = Enum.GetNames(typeof(BorderStyle));
ListBox1.DataSource = borderStyleArray;
ListBox1.DataBind();
}
}


Comments

Author: Mrs. Meetu Choudhary Nanda15 Feb 2009 Member Level: Gold   Points : 2

Please Post Your Resources fully formatted it saves lots of time while editing use & lt instead of "<" and & gt instead of ">" so that your code will appear as you want other wise it will be interpreted as HTML Tags as they are allowed in the resources... and use code /code in the big brackets as special tag to display the code snippets...

Thanks and Regards
Meetu Choudhary



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: