国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 網(wǎng)站 > 建站經(jīng)驗(yàn) > 正文

,ASP.NET取得所有顏色值示例

2019-11-02 14:51:41
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

 這篇文章主要介紹了ASP.NET取得所有顏色值的方法,需要的朋友可以參考下

(1)怎樣將電腦里有可用字體加入WINFORM中的ComboBox中: 一句話搞定:comboBox1.Items.AddRange (FontFamily.Families);  (2)取得所有可用顏色并填充到asp.net的下拉菜單中:  代碼如下:PropertyInfo[] properties; ArrayList colors; Color color; // SolidBrush brush; properties = typeof (Color).GetProperties (BindingFlags.Public | BindingFlags.Static); colors = new ArrayList (); foreach (PropertyInfo prop in properties) { // get 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 (color); //colors.Add (brush); }  (3)怎樣取得數(shù)據(jù)庫(kù)的連接字符串? A. 新建一個(gè)文本文件,文件名使用*.udl(比如:myDB.udl),此時(shí)發(fā)現(xiàn)圖標(biāo)變成數(shù)據(jù)庫(kù)連接的圖標(biāo)了。 B. 雙擊此文件,彈出數(shù)據(jù)連接屬性的對(duì)話框,此時(shí)你可以進(jìn)行設(shè)置了。一般地,我們首先選擇“提供程序”的選項(xiàng)卡,進(jìn)行設(shè)置之后,再設(shè)置“連接”選項(xiàng)卡的相關(guān)屬性,其他的我就不說(shuō)了。設(shè)置好之后,最后按“確定”。可能會(huì)有相應(yīng)的提示,你自己看著辦吧。 C. 用記事本打開(kāi)你剛才的這個(gè)文件。里面有類似這樣的字符串: Provider=SQLOLEDB.1;Password=123456sa;Persist Security Info=True;User ID=sa;Initial Catalog=ZPWeb;Data Source=MyServerName 如果使用SQLSERVER數(shù)據(jù)庫(kù),將Provider=SQLOLEDB.1;改為:Server=localhost;即可。 &nb
神馬影院[www.aikan.tv/special/shenmayingyuan/]
sp;
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 张掖市| 东辽县| 临城县| 伊通| 博兴县| 林州市| 襄汾县| 双峰县| 叶城县| 宕昌县| 雷波县| 关岭| 临沭县| 布尔津县| 方正县| 惠安县| 南川市| 巴中市| 喜德县| 黄浦区| 辛集市| 潮安县| 奉贤区| 吴江市| 博乐市| 合肥市| 沙雅县| 苗栗县| 南陵县| 松阳县| 海伦市| 阳信县| 扎兰屯市| 铜川市| 凤冈县| 永丰县| 康马县| 赣榆县| 黄山市| 会理县| 浪卡子县|