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
標籤
  • SQL Server
  • .
  • 60.5ctep
  • images
  • C
  • 移
  • 交易記錄已滿
  • -4768
  • load
  • postgres
  • sp_
  • aspjpeg
  • 12
  • ssL
  • Swashbuckl
  • machineKey
  • 100
  • loop back
  • Data
  • 2752-2744
  • sqlCacheDe
  • win
  • https:www.
  • 140
  • 762
  • 1
  • https
  • image
  • 20
  • Su
  • ad
  • ContainsAN
  • Cache Depe
  • country
  • email
  • 50
  • doug
  • �
  • 60
  • 要求已經逾時
  • 0
  • 17
  • [U2]
  • 刪除
  • Viewstate
  • FOR xml pa
  • [t]
  • ef
  • 8
  • [t],
搜尋 checkbox 結果:
使用Linq取得CheckBoxList多選值
取得CheckBoxList多選值的方式:

【未使用Linq的寫法】

       Dim values = New List(Of String)()
       For Each item As ListItem In Me.CheckBoxList1.Items
             If item.Selected Then
                  values.Add(item.Value)
             End If
       Next

       Dim result = String.Join(",", values.ToArray(Of String)())
 

【使用Linq的寫法】

               Dim result = String.Join(",", Me.CheckBoxList1.Items.Cast(Of ListItem)() _
                                   .Where(Function(x) x.Selected) _
                                   .[Select](Function(x) x.Value).ToArray())

p.s. Linq需使用.NET Framework 3.5以上的版本
More...
candice, 2014/11/26 下午 04:57:30
自製 radio button & checkbox 的注意事項
自製input 的 radio button 和 checkbox 之前常見的做法是,在input旁邊加入:not(old)的選擇器,如下所例 (以下寫法為SCSS格式)

input[type="radio"]:not(old){
width:28px;
margin:0;
padding:0;
@include opacity(0);
}
input[type="radio"]:not(old) + label{
display: inline-block;
margin-left: -28px;
padding-left: 18px;
background: url("//www.shopunt.com/images/eng/btn/radio.png") no-repeat;
width:auto;
line-height: 12px;
}
input[type="radio"]:not(old):checked + label{
background: url("//www.shopunt.com/images/eng/btn/radio-r.png") no-repeat;
width:auto;
}


但是chrome的新版本(39版)後開始,不能直接在input旁邊加:not(old),這段語法,點擊後,會無法正常顯示,所以解決的方法有兩個
1. 要使用:not(old)這段語法,不能在input旁邊加,必須是在他的外層上加,如下所例

.r-btn:not(old){
    input[type="radio"]{
     width:28px;
     margin:0;
     padding:0;
     @include opacity(0);
    }
    input[type="radio"] + label{
     display: inline-block;
     margin-left: -28px;
     padding-left: 18px;
     background: url("//www.shopunt.com/images/eng/btn/radio.png") no-repeat;
     width:auto;
     line-height: 12px;
    }
    input[type="radio"]:checked + label{
     background: url("//www.shopunt.com/images/eng/btn/radio-r.png") no-repeat;
     width:auto;
    }
}


2. 不使用:not(old),改用:not(:checked)寫法,Selectors 4也建議使用此語法,如下所例
input[type="radio"]:not(:checked), input[type="radio"]:checked {
    position: absolute;
    left: -9999px;
}
input[type="radio"]:not(checked) + label{
display: inline-block;
margin-left: 4px;
padding-left: 18px;
background: url("//www.shopunt.com/images/eng/btn/radio.png") no-repeat;
width:auto;
line-height: 12px;
}
input[type="radio"]:checked + label{
background: url("//www.shopunt.com/images/eng/btn/radio-r.png") no-repeat;
width:auto;
}


 
More...
nelson, 2014/11/21 下午 07:04:21
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
input的CSS樣式,分別對應type=text,submit,chekbox...的寫法

<style type="text/css">

INPUT {border: 1px solid #D4D0C8;width: 200px;}

input[type=text] {background-color: #FFCC33;}

input[type=checkbox],input[type=radio] {width: 20px;border: 0px;}

</style>

More...
Reiko, 2012/5/4 下午 07:22:09
~ Uwinfo ~