---選擇鄉(xiāng)鎮(zhèn)---沂城街道道托鎮(zhèn)高橋鎮(zhèn)

亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

ASP.NET驗(yàn)證控件CustomValidator客戶端驗(yàn)證Drop

系統(tǒng) 2009 0

?

      
        <
      
      
        asp:DropDownList 
      
      
        ID
      
      
        ="
        
          
            ddlTown
          
        
        "
      
      
         runat
      
      
        ="server"
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="-1"
      
      
        >
      
      ---選擇鄉(xiāng)鎮(zhèn)---
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="沂城街道"
      
      
        >
      
      沂城街道
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="道托鎮(zhèn)"
      
      
        >
      
      道托鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="高橋鎮(zhèn)"
      
      
        >
      
      高橋鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="馬站鎮(zhèn)"
      
      
        >
      
      馬站鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="楊莊鎮(zhèn)"
      
      
        >
      
      楊莊鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="富官莊鎮(zhèn)"
      
      
        >
      
      富官莊鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="圈里鄉(xiāng)"
      
      
        >
      
      圈里鄉(xiāng)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="沙溝鎮(zhèn)"
      
      
        >
      
      沙溝鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="諸葛鎮(zhèn)"
      
      
        >
      
      諸葛鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="泉莊鎮(zhèn)"
      
      
        >
      
      泉莊鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="龍家圈鎮(zhèn)"
      
      
        >
      
      龍家圈鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="黃山鋪鎮(zhèn)"
      
      
        >
      
      黃山鋪鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="崔家峪"
      
      
        >
      
      崔家峪
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="夏蔚鎮(zhèn)"
      
      
        >
      
      夏蔚鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="高莊鎮(zhèn)"
      
      
        >
      
      高莊鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="沂蒙風(fēng)情旅游區(qū)(院東頭鎮(zhèn))"
      
      
        >
      
      沂蒙風(fēng)情旅游區(qū)(院東頭鎮(zhèn))
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="許家湖鎮(zhèn)"
      
      
        >
      
      許家湖鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="四十里鎮(zhèn)"
      
      
        >
      
      四十里鎮(zhèn)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        <
      
      
        asp:ListItem 
      
      
        Value
      
      
        ="開發(fā)區(qū)"
      
      
        >
      
      開發(fā)區(qū)
      
        </
      
      
        asp:ListItem
      
      
        >
      
      
        </
      
      
        asp:DropDownList
      
      
        >
      
      
        <
      
      
        asp:CustomValidator 
      
      
        ID
      
      
        ="CustomValidator1"
      
      
         runat
      
      
        ="server"
      
      
         ErrorMessage
      
      
        ="*請(qǐng)選擇鄉(xiāng)鎮(zhèn)"
      
      
         ClientValidationFunction
      
      
        ="ChkDropDownList"
      
      
         ControlToValidate
      
      
        ="ddlTown"
      
      
        ></
      
      
        asp:CustomValidator
      
      
        >
      
    


需要的js:

      
        function
      
      
         ChkDropDownList(source, args) {

                        
      
      
        if
      
       (args.Value == "-1"
      
        )//當(dāng)下拉菜單選擇的是-1的時(shí)候,就是沒有選擇

                            args.IsValid 
      
      = 
      
        false
      
      
        ;

                        
      
      
        else
      
      
        

                            args.IsValid 
      
      = 
      
        true
      
      
        ;

                    }  
      
    

?

http://blog.163.com/dreamman_yx/blog/static/2652689420107542140761/

?

?設(shè)置Dropdownlist選中:

      
        public
      
      
        void
      
       selectValue(DropDownList ddl, 
      
        string
      
      
         value)

        {

            
      
      
        foreach
      
       (ListItem item 
      
        in
      
      
         ddl.Items)

            {

                
      
      
        if
      
       (value ==
      
         item.Value)

                    item.Selected 
      
      = 
      
        true
      
      
        ;

            }

        }
      
    

下拉菜單設(shè)置選中項(xiàng): ddlCity. SelectedIndex = ddlCity.Items.IndexOf ( ddlCity.Items.FindByText ( cityname ));

?

?

?

?

?

ASP.NET驗(yàn)證控件CustomValidator客戶端驗(yàn)證DropDownList、TextBox


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 免费看一级做a爰片久久 | 性欧美视频 | 欧美一欧美一级毛片 | 欧美日韩中文一区二区三区 | 亚洲精品综合一二三区在线 | 四虎4hu影库永久地址 | 天天摸天天操天天爽 | 一级片手机在线观看 | 在线色片| 久久久久久99精品 | 国产精品亚洲一区二区在线观看 | 色妇色综合久久夜夜 | 日韩一区二区三区在线 | 91久久视频 | x8x8国产日韩欧美 | 亚洲在线中文 | 天天看片天天爽 | 伊人中文字幕 | 996re免费热在线视频手机 | 中文字幕一二三区 | 手机看片国产永久1204 | 亚洲精品久荜中文字幕 | 欧美日韩毛片 | 欧美激情综合 | 国产成人精品视频一区二区不卡 | 97色精品视频在线观看免费 | 日本一区不卡视频 | 中文字幕不卡免费高清视频 | 亚洲一区二区三区在线视频 | 欧美激情毛片 | 成人影院一区二区三区 | 四色婷婷 | 伊人色综合琪琪久久社区 | 欧美成人精品高清在线观看 | 99er视频| 久久精品亚洲精品国产欧美 | 四虎影院在线看 | chinese国产xxxx中国 | 一级女性全黄生活片免费 | a一级日本特黄aaa大片 | 色偷偷88888欧美精品久久久 |