今天編譯主控台程式時,
發生HttpClient CS0246的錯誤,
souts 發表在 痞客邦 留言(0) 人氣(1,193)
private double opacity = 0;
//API
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
//說明:http://www.vbgood.com/api-releasecapture.html
[DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
//說明:http://www.vbgood.com/api-sendmessage.html
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
souts 發表在 痞客邦 留言(0) 人氣(259)
string strUrl ="
http://www.ip138.com/ip2city.asp";
//獲得IP的網址了
Uri uri =newUri(strUrl);
System.Net.WebRequest wr = System.Net.WebRequest.Create(uri);
System.IO.Stream s = wr.GetResponse().GetResponseStream();
System.IO.StreamReader sr =new System.IO.StreamReader(s, Encoding.Default);
string all = sr.ReadToEnd(); //讀取網站的數據
string IP =new System.Text.RegularExpressions.Regex(@"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}").Match(all).Value;
//Winform取得外網IP只能使用訪問網頁來取得真實IP,下面的兩種方式都只能取得區網IP
//(1)
//IPHostEntry MyEntry = Dns.GetHostEntry(Dns.GetHostName());
//string IP = MyEntry.AddressList[0].ToString();
//(2)
//IPHostEntry MyEntry = Dns.Resolve(Dns.GetHostName());
//string IP = MyEntry.AddressList[0].ToString();
souts 發表在 痞客邦 留言(0) 人氣(315)
string strUrl = "http://tw.yahoo.com/";
string strHtml = string.Empty;
souts 發表在 痞客邦 留言(1) 人氣(261)
推文到FACEBOOK
<meta name="description" content="網站摘要內容" />
<link rel="image_src" type="image/jpeg"
souts 發表在 痞客邦 留言(0) 人氣(254)
King的幸福國度-[ASP.NET]在UPDATEPANEL中,引用Jquery會失效 「已解決」
《CGW》資訊and程式書-Jquery Ajax UpdatePanel PostBack後 Jquery失效
在UpdatePanel中插入使用Jquery的日期元件,
souts 發表在 痞客邦 留言(0) 人氣(1,198)
//讀取回條
MailMessage msg = new MailMessage("Send@gmail", email, subject, msgbody);
souts 發表在 痞客邦 留言(0) 人氣(1,269)
當網頁使用MasterPage,頁面插入css後,有時在設計階段,要增加事件,比較方便是從程式碼模式換成設計模式,但在切換後,會出現以下詢息:
`無法切換至設計檢視,因為頁面發生錯誤。請修正錯誤清單中標「無法切換:」的所有錯誤,然後再試一次。`
只要將此段程式放在Page_Load事件中,就可正常切換。
souts 發表在 痞客邦 留言(0) 人氣(150)
在使用NPOI上傳Excel進行資料匯入動作時,
卻出以下的錯誤訊息:
Initialisation of record 0x862 left 2 bytes remaining still to be read.
原因是在於使用的NPOI版本比較舊,
souts 發表在 痞客邦 留言(0) 人氣(830)
在asp.net網頁中有一DropDownList控制項如下,
<asp:DropDownList ID="ddl" runat="server" AutoPostBack="True" onselectedindexchanged="ddl_SelectedIndexChanged">
<asp:ListItem Selected="true" Value="" Text="請選擇" />
<asp:ListItem Value="1" Text="第一項" />
<asp:ListItem Value="1" Text="第二項" />
</asp:DropDownList>
souts 發表在 痞客邦 留言(0) 人氣(651)