C#Ôõô¶ÁÈ¡Ò»¸öHTML±ê¼Ç
ÐèÇóÊÇÕâÑùµÄ£ºÖªµÀÒ»¸öhtmlÒ³ÃæµÄ·¾¶£¬È»ºóÏëÒªµÃµ½Õâ¸öhtmlÒ³ÃæµÄhtml±ê¼Ç£¨Ò²ÊǾÍÔ´ÎļþÖеÄÄÇЩÄÚÈÝ£©£¬²¢×÷Ϊһ¸östring·µ»Ø¡£
string htmlPath = @"E:\1.html";
public string HtmlCode(string htmlPath)
{
//TODO:»ñÈ¡Ô´Îļþ£¬×÷Ϊһ¸ö×Ö·û´®·µ»Ø
}
C# code:
webRequest.webresponse;
StreamReader reader=new StreamRead(request.getResponseStream);
string html=reader.toEnd();
C# code:
public string HtmlCode(string htmlPath)
{
//TODO:»ñÈ¡Ô´Îļþ£¬×÷Ϊһ¸ö×Ö·û´®·µ»Ø
return System.IO.File.OpenText(htmlPath).ReadToEnd().ToString();
}
´ó¸ç£¬¿ÉÒÔ×ö¸öСÀý×ÓÂð£¬Ð¡µÜÎÒÓе㿴²»¶®°¡
лл°¡£¬ÎÒÊÔÊÔ¿´£¬µÚÒ»¸ö·½·¨ÊÇʲôÒâ˼£¬ÄÜ˵˵Âð£¬
Ïà¹ØÎÊ´ð£º
ÎÒµÄjava applet ǶÈëhtmlºóÎÞ·¨ÏÔʾ£¬¶øÓÃappletviewerÏÔʾÕý³£ÎªÊ²Ã´£¬»¹ÓоÍÊÇÓÃhtml converterת»¯ºó¿ÉÒÔÏÔʾ£¬ÎªÊ²Ã´£¿Çë´óÏÀ´Í½Ì£¡
HTML code:
<HTML>
<HEAD>
<TITLE>TEST.HTML< ......
´ó¼ÒºÃ£¬ÔÚ¿ª·¢µÄʱºò£¬Óöµ½ÕâÑùµÄÎÊÌ⣺
δÄܼÓÔØÎļþ»ò³ÌÐò¼¯¡°Oracle.DataAccess, Version=10.1.0.200, Culture=neutral, PublicKeyToken=89b483f429c47342¡±»òËüµÄijһ¸öÒÀÀµÏϵͳÕÒ²»µ½Ö¸¶¨µÄÎļþ¡£ ......
ÎÒÔÚ×öÒ»¸öÍøÕ¾aspµÄ£¬ÏëÉú³Éhtml£¬Éú³ÉºóÈçºÎµ÷ÓÃÄØ£¿
È磺ÎÒµ±Ç°µ÷ÓÃÒ³ÃæÊÇhttp://192.168.0.100/jdasp/x.asp?cnmai=1795 £¬Éú³ÉµÄÊÇx1795.htmlÎļþ£¬
ÈçºÎÔÚµ÷ÓÃx ......
SqlConnection conn = new SqlConnection("server = (local)\\sqlexpress;integrated security = SSPI;database = Northwind");
conn.Open();
Á¬½Ó²»ÉÏ£ ......
´óÏÀÃÇ£º
ÕâÊÇÎÒÁ¬½ÓÊý¾Ý¿âµÄ´úÂë
string strPath = Application.StartupPath + "\\Database.accdb";
&n ......