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
標籤
  • en
  • url
  • ef
  • 12
  • sp_
  • backup
  • FB1
  • 2981
  • SVG
  • 744
  • length
  • 144
  • 權限
  • pdb
  • yyy
  • 412
  • Encode
  • 288
  • 98
  • [t]
  • tim
  • GN
  • WU
  • editor
  • SqlCacheDe
  • 光
  • pG2rL0AN
  • 1
  • cros
  • 方案總管
  • window
  • Rf
  • AD
  • entify
  • 有潛在危險 Requ
  • exception
  • sa
  • date[t] OR
  • -5688 UNIO
  • 上傳檔案太大
  • attr
  • [u2]
  • c
  • aJkc4exf
  • User
  • 0
  • max2121121
  • 檔案
  • SQL 授權
  • @@YOTU3
頁數 5 / 9 上一頁 下一頁
搜尋 orm 結果:
C# 下拉選單AutoPostBack後Button點擊沒反應
改用javascript送出
<asp:Button ID="BtnSubmit" runat="server" Text="修改" OnClick="BtnSubmit_Click" OnClientClick="return formSubmit('true');" />


<script type="text/javascript">
                function formSubmit(val) {
                    if (val== "true")
                    {
                        form1.submit();
                    } else {
                        return false;
                    }
                }
            </script>


相關專案: 光寶
More...
Reiko, 2015/6/29 下午 03:49:57
Server 2008R2 安裝 .net 3.5
這是假設 server 已經先安裝 .net 4.0 
首先,不需從網路下載 .net framework3.5
必須從 "伺服器管理員" 去新增功能加入

安裝完之後,跑 NET 4.0 網站會錯誤
[IIS] IIS出現[無法從組件 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' 載入型別 'System.ServiceModel.Activation.HttpModule'。] 錯誤訊息排解

若要正常使用必須要再跑以下指令
以 "系統管理員" 開啟 cmd.exe
執行
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
More...
darren, 2015/6/8 下午 11:59:15
用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
若是最簡單的方式來設定 cookie 時, 
document.cookie = "name=value";
, 會使用目前網頁所在的 Path 做為預設的 Path,所以若是從另一個目錄的網頁來讀 cookie 時, 有可能會讀不到。 

解決的辨法是指定 Path 為 "/" 如下, 
document.cookie = "name=value;path=/";
More...
Bike, 2015/5/9 下午 12:50:54
資料前後端傳遞回顧
在做地址的時候用了一個套件(TWZIPCODE)
可以幫你產生下拉霸的郵遞區號選項
很方便(jQuery)
但是在控制他的資料及回傳
又不知道怎樣比較方便直觀了

首先目前也是文字控制的方式是
UWForUNT.WU.ReplaceStringInControl(Me.Page, "#Post_Code#", Post_Code)
直接用 #Post_Code#
再把她取代

直接讓前端讀到值

回傳時 若是用後端控制 不用再傳ajax 或是 塞到別的後端控制項
回傳的方式
UW.WU.GetValueFromQueryStringOrForm("Post_Code")

但是因為之後不讓 Page Load 再次改成預設值
可以加
If Not Me.IsPostBack Then
   UW.WU.GetValueFromQueryStringOrForm("Post_Code")
End If
才不會永遠是預設值
(            $('#twzipcode').twzipcode({
            zipcodeSel: '#Post_Code#', // 此參數會優先於 countySel, districtSel
            countySel: '台北市',
            districtSel: '大安區',
            zipcodeName: 'Post_Code'
            })
)

他如果有包在裡可以直接讀取

另外若是 有一些後端要傳給前端的資料 用response.Write("<script>XXX</script>")
可以直接寫入前端
More...
sean, 2014/11/27 下午 04:20:42
Fixing Windows 2008 R2 Activation Errors
http://lifeofageekadmin.com/fixing-windows-2008-r2-activation-errors/

​Location is at C:\windows\system32\Slmgr.vbs
/ckms = clear all KMS servers in cache and set to auto discover
/skms :  = Specify a KMS host server
/ipk  = Enter in a new license key
/ato = Activate the new key
/dlv = Display license information
First open a command prompt and try to register a license key. This example is for Windows 2008 R2 Enterprise Edition.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
If you receive activation successful you are complete. If you receive a 0xC004F074 error do the following.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ckms
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
If you receive activation successful you are complete. If you receive a 0xC004F074 error again or another error do the following.
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /rilc
Reboot
C:\> Cd c:\windows\system32
C:\Windows\system32>cscript slmgr.vbs /ckms
C:\Windows\system32>cscript slmgr.vbs /ipk
C:\Windows\system32>cscript slmgr.vbs /ato
More information can be found at Configuring KMS Clients
More...
Bike, 2014/11/3 下午 04:49:25
IsNumeric 以及 Convert.ToInt32(char) 要注意的狀況
最近做一些int型別轉換的時候,發現一些現象,以後寫code的時候要注意

1. VB.NET IsNumeric 用逗號可以過,例如 IsNumeric("1234,5678") ==> True
   但是轉型別 CInt or Convert.ToInt32 就會出錯,所以用 IsNumeric 不是很保險,最好用 int.TryParse

2. Convert.ToInt32(char) 會抓出該 char 的 ascii code, 而不是該文字代表的數字
   Convert.ToInt32('9') ==> 57  (C# 用單引號代表是 char)
   Convert.ToInt32("9") ==> 9
   Convert.ToInt32('A') ==> 65  (C# 用單引號代表是 char)
   Convert.ToInt32("A") ==> error: 輸入字串格式不正確。
More...
darren, 2014/10/28 下午 07:10:28
form 的 reset 功能對 hidden field 無作用
一般正常來說 如果要網頁的表單(Form) 做資料清除的動作
只要下 reset() 指令就可
document.getElementById("form1").reset();

但是對於 hidden field
<input type='hidden' name='txtId' value='xxx' />

這個方法是沒有作用的 資料還是在

兩個方法解決:
1. reset 之後再各自去清掉 hidden field 的 value (有點笨)
2. 不要用 hidden field 改用 display:none 的 DIV 去包要隱藏的 field
 
More...
darren, 2014/7/10 上午 10:23:38
在 IE9 被 console.log 卡住
IE8 和 IE9 預設沒有 console 物件,若是在 javascript 中有加入 console.log 時,會卡住,解決辨法是做個假的出來。如下:


       //避免 console.log 發生錯誤.
        if (typeof console == "undefined") var console = { log: function () { } };
        else if (typeof console.log == "undefined") console.log = function () { };
More...
Bike, 2014/6/26 下午 07:54:10
訂單明細
小計:Format(Order_Main.Total_訂單層級的購物原始金額_包括產品單價的折價, "#,###,##0")
Order_Main.Total_訂單層級的購物原始金額_包括產品單價的折價 = Me.Total + Me.Deduct_Amt + Me.CouponAdd
Order_Main.Total = 當下所付的現金
Order_Main.Deduct_Amt = 當下U幣使用多少(已經除以30成為台幣了)
Order_Main.CouponAdd = 某些CouponCode會讓商品變貴,例如Global的自由選。

U幣折抵金額:Format(Order_Main.Deduct_Amt, "#,###,##0")
Order_Main.Deduct_Amt = 當下U幣使用多少(已經除以30成為台幣了)

GetE_coupon折抵金額:Format(Order_Main.CouponDiscount, "#,###,##0")
Order_Main.CouponDiscount是指訂單成立當下所有coupon加起來的金額~
如果想要知道細項,只能反查V_UsedCoupon,查看當下有哪些Couponcode有被使用。
也因為是後來才法查的,因此若是coupon設定與當下不符合,數字很可能就會對不起來了~
couponcode.IsExtraInput AndAlso oUC.CouponCode.Length > 0 
可用來判別是否需要手動輸入couponcode

折讓:Order_Main.Amount_Shortage - (Order_Main.TotalDiscount_訂單層級的折抵_不包括子訂單的折價 - Order_Main.Deduct_Amt - Order_Main.CouponDiscount)
Order_Main.TotalDiscount_訂單層級的折抵_不包括子訂單的折價 = Me.Discount + Me.Loyalty_Reward_Used + Me.Welcome_Reward_Used + Me.Deduct_Amt
折讓 = Order_Main.Amount_Shortage - (Me.Discount + Me.Loyalty_Reward_Used + Me.Welcome_Reward_Used + Me.Deduct_Amt + Me.CouponDiscount) + Order_Main.Deduct_Amt - Order_Main.CouponDiscount
折讓 = Order_Main.Amount_Shortage + Me.Discount + Me.Loyalty_Reward_Used + Me.Welcome_Reward_Used
有可能是正的~也可能是負的~
'訂單管管理頁面可以填寫 補差額 折讓 兩個欄位 http://zxp09.dev.shopunt.com.tw/Admin/Order/OrderEdit.aspx?page=1&Id=163761
'補差額是一個品項 想像成一個不會出的商品 用來讓整筆訂單變貴的方式~
 
More...
Doug, 2014/4/24 上午 11:52:57
jquery 中判斷 checkbox 是否選取的不要再用 attr 要改用 prop
最近為了在 iframe 中的 history.goback 的問題,把後台的 jquery 升級到 1.10.1 版,結果發生讓 checkbox 全選的語法無效,原來是 attr('checked') 在 1.10.1 版中不會隨著 checkbox 是否選取而改變。


<input type="checkbox" onclick="if ($(this).attr('checked')) { $('.cbProducts').attr('checked', true) } else { $('.cbProducts').attr('checked', false) }" />

要換成

<input type="checkbox" onclick="if ($(this).prop('checked')) { $('.cbProducts').prop('checked', true) } else { $('.cbProducts').prop('checked', false) }" />


不過很麻煩節是,若是 jquery 1.5.x 及以前的版本是不支援 prop 的,請參考文章:
http://blog.xuite.net/vexed/tech/44905647-jQuery+1.6+.attr()+%E5%92%8C+.prop()

我先把後台的 MasterPageWithForm.master 由 1.10.1 改回 1.6.2 版, MasterPage.master 和 MasterPage_NoMenu.master 兩支程式的 jquery 由 1.5.1 改到 1.6.2 版。未來要升級 1.10.1 以上的版本時可能會需要大工程把 attr 改為 prop。 或是考慮用 

$.fn.attr = $.fn.prop;

來把整個 attr 改為 prop


 
More...
Bike, 2014/2/23 上午 02:57:24
|< 123456789 >|
頁數 5 / 9 上一頁 下一頁
~ Uwinfo ~