[HTML±à¼Æ÷]C#±àдµÄHTML±à¼Æ÷£ºÔÀíÆª
×÷Õߣº¹â½ÅѾ˼¿¼ ʱ¼ä£º12/23/2009 1:51:00 PM
Ò»¿ªÊ¼¾Í¾õµÃHTML±à¼Æ÷ÕâÍæÒâÓ¦¸ÃÊǺܸßÉîβâµÄ¡£ËæËæ±ã±ã¾ÍÏëÕûÒ»¸öÓ¦¸Ã²»ÊÇÒ»¼þÈÝÒ×µÄÊÂÇé¡£ºóÀ´¶ÔWebBrowser¿Ø¼þÓÐÁËһЩÁ˽⣬²»¹ý¶¼ÊǺܷôdzµÄÁ˽⡣ֻ֪µÀÓÃÕâ¸ö¿Ø¼þ¾ÍÄܹ»ÔÚ×Ô¼ºµÄ³ÌÐòÖиãÒ»¸öWEBä¯ÀÀÆ÷Ö®ÀàµÄ¶«Î÷£¬´ÓÀ´Ã»ÓÐÏë¹ýHTML±à¼Æ÷Ò²¿ÉÒÔʹÓÃÕâ¸ö¿Ø¼þÀ´ÊµÏÖ¡£Ò²¾ÍÊÇ˵Õâ¸öWebBrowser¿Ø¼þ²»½ö½öÄܹ»ÓÃÀ´ÏÔʾHTMLÎĵµ£¬¶øÇÒÒ²¿ÉÒÔÓÃÀ´±à¼HTMLÎĵµ¡£µ±È»ÁË£¬ÕâЩ¹¦ÄÜ΢ÈíÒѾ¶¼Ìṩ¸øÎÒÃÇÁË¡£ËùÐèÒª×öµÄ¾ÍÊǰ´ÕÕÄǸö¹æÔòÈ¥±àд×Ô¼ºµÄ´úÂëÁË¡£ÎÒÏëHTML±à¼Æ÷µÄʵÏÖ·½Ê½²»Ó¦¸ÃÖ»ÓÐÕâÒ»ÖÖ£¬Ö»ÊÇÔÛ²»»á¾ÍÊÇÁË£¡^_^
ÏÈÀ´¿´¿´ÎÒ×Ô¼ºÊµÏÖµÄÕâ¸öСÈí¼þ£¬½çÃæÈçÏÂͼ£º
³¬¼¶¼òµ¥µÄСÈí¼þ°É£¡
ÄǸö¡¾ÎÄ×ÖÏÂÀÁÐ±í¡¿ÊÇÓÃÀ´ÐÞ¸Ä×ÖÌåµÄ£¬¡¾¼Ó´Ö¡¿°´Å¥ÊÇÓÃÀ´½«×ÖÌå¼Ó´Ö£¬»òÕßÈÃÆä¼õ·ÊµÄ£¬¡¾Ï»®Ïß¡¿°´Å¥ÔòÊÇΪѡÖеÄÎÄ×Ö¼Ó¼õÏ»®Ïߵġ£×îºóÄǸö¡¾ÏÔʾԴÂë¡¿°´Å¥Ö÷ÒªÊÇΪÁË¿´¿´ÐÞ¸Ä֮ǰºÍÐÞ¸ÄÖ®ºóµÄHTMLÔ´Âë¶¼×öÁËÄÇЩ¸Ä±ä¡£ÆäËû¾ÍûʲôÁË¡£
Ï·½µÄÄÇ¿é´óµÄ¿Õ°×ÇøÓò£¬¾ÍÊÇWebBrowser¿Ø¼þÁË£¬¼ÈÊÇÓÃÀ´ÏÔʾHTMLÎĵµ£¬Ò²ÊÇÓÃÀ´±à¼HTMLÎĵµµÄ£¬ÔÚÕâÀïÖ»ÓÃ×÷±à¼Æ÷¡£
½Ó×ÅÀ´¿´Ô´´úÂë°É¡¡
ĬÈÏÇé¿öÏ£¬WebBrowser²¢Ã»Óд¦ÓÚ±à¼Ä£Ê½£¬ËùÒÔ»¹²»ÄÜ¶ÔÆäÎĵµ½øÐб༴¦ÀíµÄ¡£ÎªÁËʹÆä´¦ÓÚ±à¼×´Ì¬£¬¿ÉÒÔÔÚ´°Ìå¼ÓÔØÊ¼þµÄ·½·¨ÖÐÌí¼ÓÈçÏ´úÂ룺
private void MainForm_Load(object sender, EventArgs e)
{
this.webBrowser.DocumentText = string.Empty;
this.webBrowser.Document.ExecCommand("EditMode", false, null);
this.webBrowser.Document.ExecCommand("LiveResize", false, null); }
ÌØ±ð×¢ÒâÄǸöÂÌ´ÖÏß»µÄ²¿·Ö(EditMode)£¬ÕâÊǹؼüµã¡£²»¹ýËÆºõÒ²²»ÒªºöÂÔÁËΪDocumentText¸³Öµ£¬²»ÒªÈÃÕâ¸öֵΪnull£¬·ñÔòµÄ»°Á¬DocumentÒ²nullÁË£¬µ½Ê±ÏëÒªÖ´ÐÐExecCommandÕâ¸ö·½·¨ÄÇÊDz»³ÉµÄ¡£ÕâµãÊÇÔÚÎÒ±àд´úÂëµÄʱºòÎÞÒâ·¢Ïֵģ¬Ëü¸øÎÒÒì³£ÁË¡£
ÓÐÁËÉÏÃæÕâ¶Î´úÂ룬Ȼºó¾Í»á·¢ÏÖWebBrowser¿ÉÒÔ½øÐбà¼ÁË£¬¿ªÊ¼ÓеãÏñTextBoxÁË£¬Äܹ»ÊäÈëÎÄ×ÖÖ®ÀàµÄ¶«Î÷ÁË¡£
ÖÁÓÚÈçºÎ´ÓϵͳÖлñÈ¡ËùÓеÄ×ÖÌ壬²¢ÇÒ½«ËüÌí¼Óµ½ÏÂÀÁбíÖеȵÈÖ®ÀàµÄ´úÂë¾Í×Ô¼ºÈ¥¿´°É¡£½ÓÏÂÀ´Òª¿´µÄÊÇÈçºÎÐÞ¸ÄÎĵµ¡£ÏÈÔĶÁÏÂÃæµÄ´úÂ룺
private void BoldButton_Click(object sender, EventArgs e)
{
this.webBrowser.Document.ExecCommand("Bold", false, null);
}
Õâ¶Î´úÂëÊÇÄǸö¡¾¼Ó´Ö¡¿°´Å¥µÄClickʼþ´¦Àí´úÂë¡£ÆäÖÐ
Ïà¹ØÎĵµ£º
Visual C#Öж¯Ì¬²Ù×÷SQL ServerÊý¾Ý¿â £¨1£©
·¢²¼Ê±¼ä£º2003.01.14 10:09 À´Ô´£ºÈüµÏÍø ×÷ÕߣºÍõ¿Ã÷
ÔÚ±àдÊý¾Ý¿âÓ¦ÓóÌÐòµÄʱºò£¬ÎÒÃÇ¿ÉÒÔͨ¹ýSQLÓï¾äÀ´¶¯Ì¬´´½¨¡¢ÐÞ¸ÄÊý¾Ý¿âÒÔ¼°ÆäÖеĶÔÏó¡£±¾ÎÄÎÒ¾ÍÏò´ó¼Ò½éÉÜÈçºÎÔËÓÃVisual C#À´¶¯Ì¬²Ù×÷SQL ServerÊý¾Ý¿ ......
¸ù¾Ý¼ôÌù°åµÄÔÀí£¬ÔÚ»ñÈ¡¼ôÌù°åÄÚÈÝ֮ǰ£¬±ØÐëÖ¸¶¨Òª»ñÈ¡ÄÚÈݵĸñʽ¡£ÓÉÓÚ¼ôÌù°åÖеÄÊý¾Ý¿ÉÄÜ´æÔÚ¶àÖÖ¸ñʽ£¬ËùÒÔÓбØÒª¶Ô¼ôÌù°åµÄ¸ñʽÀàÐÍÏÈ×öһЩÁ˽⡣WдÏÂÁËÒÔϵIJâÊÔ´úÂ룺
procedure TForm1.Button3Click(Sender: TObject);
var
i: integer;
Buffer: PChar;
s: string;
begin
M ......
ʾÀýÑÝʾÁËÓÃC#²Ù×÷MySQLµÄ·½·¨£¬ÌṩÁËÈý¸ö¿ÉÖØÓõÄÀàMySqlDBUtil,MySqlPageUtil,Page¡£
±¾Ê¾ÀýÓÉ C#²Ù×÷AccessÊý¾Ý¿âµÄ¼òµ¥Àý×Ó£¨http://www.albertsong.com/read-56.html£©Ð޸ĶøÀ´¡£
1.Ê×ÏÈÏÂÔØMySQLÊý¾Ý¿âµÄ.NETÇý¶¯
http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.0.8.1-noinstall.zip/ ......
<Language from="SQL" To="C#">
<Type from="bigint" To="long" />
<Type from="binary" To="object" />
<Type from="bit" To="bool" />
<Type from="char" To="string" />
<Type from="datetime" To="DateTime" ......
C#
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Config/User_yhlx_Jb.xml"));
DataView dv = ds.Tables[0].DefaultView;
//dv.RowFilter = "State=0";
this.DropDownList1.DataSource = dv;
this.DropDownList1.DataTextField = "text";
this ......