UWInfo Blog
發表新文章
[Join] | [忘記密碼] | [Login]
搜尋

搜尋意見
文章分類-#Author#
[所有文章分類]
所有文章分類
  • ASP.NET (48)
  • ASP.NET2.0 (15)
  • ASP.NET4.0 (34)
  • JavaScript (49)
  • jQuery (26)
  • FireFox (4)
  • UW系統設定 (3)
  • SQL (39)
  • SQL 2008 (25)
  • mirror (4)
  • SVN (4)
  • IE (9)
  • IIS (20)
  • IIS6 (1)
  • 閒聊 (7)
  • W3C (6)
  • 作業系統 (9)
  • C# (24)
  • CSS (12)
  • FileServer (1)
  • HTML 5 (11)
  • CKEditor (3)
  • UW.dll (13)
  • Visual Studio (16)
  • Browser (8)
  • SEO (1)
  • Google Apps (3)
  • 網站輔助系統 (4)
  • DNS (5)
  • SMTP (4)
  • 網管 (11)
  • 社群API (3)
  • SSL (4)
  • App_Inventor (1)
  • URLRewrite (2)
  • 開發工具 (6)
  • JSON (1)
  • Excel2007 (1)
  • 試題 (3)
  • LINQ (1)
  • bootstrap (0)
  • Vue (3)
  • IIS7 (3)
  • foodpanda (2)
  • 編碼 (2)
  • 資安 (3)
  • Sourcetree (1)
  • MAUI (1)
  • CMD (1)
  • my sql (1)
最新回應
  • Newtonsoft.Json.JsonConvert.DeserializeObject 失敗的情況
    test...more
  • dotnet ef dbcontext scaffold
    ...more
  • [ASP.NET] 利用 aspnet_regiis 加密 web.config
    ...more
  • IIS ARR (reverse proxy) 服務安裝
    ...more
  • [錯誤訊息] 請加入 ScriptResourceMapping 命名的 jquery (區分大小寫)
    ...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ...more
  • 線上客服 - MSN
    本人信箱被盜用以致資料外洩,是否可以請貴平台予以協助刪除該信箱之使用謝謝囉...more
  • 插入文字到游標或選取處
    aaaaa...more
  • IIS 配合 AD (Active Directory) 認証, 使用 .Net 6.0
    太感謝你了~~~你救了我被windows 認證卡了好幾天QQ...more
  • PostgreSQL 的 monitor trigger
    FOR EACH ROW 可能要改為 FOR EACH STATEMENT ...more
標籤
  • 88
  • sp_
  • copy db
  • Rewrite
  • ca2yexpf
  • VPN
  • IE11
  • connection
  • Ubuntu
  • 122[t]
  • hkscs
  • 192[t]
  • -2882
  • SQL
  • 15.1MQtn
  • wsdl
  • Sourcetree
  • ssl lab
  • ORM
  • MustInheri
  • a
  • ORM,
  • CredSSP
  • No EditorO
  • Ttzdu6Pf
  • nexttick
  • LINE
  • Deadlock
  • sqlbuilder
  • for
  • 下載
  • 9900222
  • sqld
  • sql2008
  • sqlDate
  • 7740
  • sqlcmd
  • sqlite
  • for [t]
  • dotnet
  • iis 8.5
  • -5304
  • iis_iusr
  • @@S2efe
  • -2846
  • SqlCache
  • message,
  • -8739 UNIO
  • -3849
  • Su
頁數 2 / 2 上一頁
搜尋 button 結果:
線上客服 - MSN
※請輸入對方的MSN帳號
<input id="Text1" type="text" />
<input id="Button1" onclick="location.href='msnim:chat?contact=' + $('#Text1').val()" type="button" value="談話" />




※直接新增聯絡人(前提是有安裝MSN)
<a href="msnim:add?contact=MSN帳號">加入我的MSN</a>

加入我的MSN


※在網頁、BLOG嵌入「MSN聊天視窗」

如何在網頁、BLOG嵌入「MSN聊天視窗」?(不來恩)
More...
Reiko, 2012/5/17 下午 02:53:39
VB 轉 C# 問題整理
之前將部分UW網站VB程式碼轉到C#,
我是用此工具轉
http://www.developerfusion.com/tools/convert/vb-to-csharp/
轉換後,放到visual studio還是有很多毛毛蟲
整理一些問題, 希望能減少轉換上的困難
 
1. Imports --> using (using 只能用namespace)
   System.Web.HttpContext 是不能放在using, 因為他是類別, 不是 namspace
   所以 Current.Session 要調整成 HttpContext.Current.Session
 
2. index或是key, value類的東西要用中括號 []
   VB:Session("name") --> C#:Session["name"]
   Cache(""), Application(""), DataRow("") 也是一樣
   
3. 所有方法都要加上 ()
   例如 ToString --> ToString()
   例如 ToLower --> ToLower()
 
4. 不能隱含式的型別轉換, 要明確
   轉換型態可以有以下方法
   - 轉字串時, 直接後面加上 .ToString()
   - Convert 物件轉換
   - 變數名稱前面加上(Type), 例如 (HashTable)Session["htData"]
   - 以 as 方式轉換, 若要轉換的物件可能是null建議用此方法, 例如 
     System.Net.HttpWebRequest http = System.Net.WebRequest.Create(Url) as System.Net.HttpWebRequest;
     string strData = HttpContext.Current.Cache["CacheName"] as string;
     用 as 方法不會強制轉換, 用 (Type) 或 ToString() 一旦遇到 null 會發生Exception
 
5. 帶參數的 Property C#是不允許的, .Net 會自動產生 get_ function 取代
   VB: UW.WU.URL --> C#: UW.WU.get_URL();
 
6. partial 要放在 public 後面
 
7. aspx頁面C#的檔頭要設定AutoEventWireup="true"
     另外所有的 server control 的 On Event 所執行的function name (例如 Button 的 OnClick)  都要在 aspx 裡面設定
   (這部分會在後台程式發生,因為轉換後常忘了加)
   <asp:DropDownList ID="ddlName" runat="server" AutoPostBack="true" 
      OnSelectedIndexChanged="ddlName_SelectedIndexChanged"></asp:DropDownList>
   <asp:Button ID="btnAdd" runat="server" Text="新增" OnClick="btnAdd_Click" />
 
8. 因為字串相加也是 +, 一些特殊寫法要注意
   VB: (Url & "Page=" & EndPage + 1)    --> VB會先將整數加好後再字串相加
   c#: (Url + "Page=" + (EndPage + 1))  --> 由於C#會先將1轉為字串再把所有字串相加 , 所以要先用括號包起來先讓整數相加

9. vbCrLf -> "\r\n"
    vbTab ->  "\t"

10. VB function 轉換 
    Conversion.Fix -> Math.Floor
     Strings.Format(x, "###0.0") -> 用 x.ToString("N1");

11. EN 處理要多加注意,需額外加 (int) 才會顯示數值,很多 sql 指令這樣拼要小心
" where EN_產品性質 = " + SHOPUNT.EN.產品性質.非成品 ; -> where EN_產品性質 = 非成品   (會出錯)
" where EN_產品性質 = " + (int)SHOPUNT.EN.產品性質.非成品; -> where EN_產品性質 = 100

先整理這些 以後遇到再加上


 
More...
darren, 2012/5/17 上午 10:50:34
插入文字到游標或選取處

<textarea id="myTextArea" style="WIDTH: 376px; HEIGHT: 160px" rows="10" cols="44"></textarea>
<input type="button" value="插入測試" onclick="InsertContent('myTextArea','我是要插入的文字');">

function InsertContent(AreaID,Content){
   var myArea = document.getElementById(AreaID);
   //IE
   if (document.selection){
      myArea.focus();
      var mySelection =document.selection.createRange();
      mySelection.text = Content;
   }else{
   //FireFox
     var myPrefix = myArea.value.substring(0, myArea.selectionStart);
     var mySuffix = myArea.value.substring(myArea.selectionEnd);
     myArea.value = myPrefix + Content + mySuffix;
   }
}

More...
Reiko, 2012/3/29 下午 07:30:01
|< 12 >|
頁數 2 / 2 上一頁
~ Uwinfo ~