This article mainly introduces asp.net to obtain all color values of the method, the need for friends can refer to the following
(1) How to add the fonts available in the computer to the ComboBox in the WinForm: a word to be done: ComboBox1.Items.AddRange (fontfamily.families); (2) Get all available colors and fill in the ASP.net drop-down menu: code as follows: propertyinfo[] properties; ArrayList color color; //SolidBrush brush; properties = typeof (Color). GetProperties (BindingFlags.Public | bindingflags.static); colors = new ArrayList (); foreach (PropertyInfo prop in properties) { //GE t the value of this static property color = (color) Prop. GetValue (null, NULL); //skip colors that are not interesting if (color = = color.transparent) continue; if (color = = Color.Empty) continue; try { ddlList.Items.Add (Prop. Name); } catch { } //Create a solid brush of this color //brush = new SolidBrush (col OR); //colors. ADD (Brush); } (3) How do I get the connection string for the database? A. Create a new text file with the filename *.udl (for example: mydb.udl), where the icon becomes the icon for the database connection. B. Double-click this file to eject the dialog box for the properties of the data connection.Now you can set it up. Generally, we first select the "Provider" tab, after setting, and then set the related properties of the Connection tab, I will not say anything else. When you have set it up, press OK at the end. There may be a corresponding hint, you can do it yourself. C. Use Notepad to open the file you just made. Inside there is a string like this: provider=sqloledb.1; PASSWORD=123456SA; Persist Security info=true; User Id=sa;initial Catalog=zpweb;data source=myservername if the SQL Server database is used, the provider=sqloledb.1 is changed to: Server= localhost: you can.