asp.net比较验证器控件 [英] asp.net compare validator control

查看:117
本文介绍了asp.net比较验证器控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Birtday的第一个文本框,并使用calenderextender控件
第二个文本框是Todaydate文本框,可见false

我比较生日不小于今天
我将比较验证器控件和生日"比较到txttodaydate文本框
如果我今天做的话,则texbox是可见的假值不是comapre
但是我确实成功地看到了它的可比性.



我想今天约会textxox可见为假

请怎么做才能帮助我

I take a first textbox of Birtday and use a calenderextender control
and second textbox is a todaydate textbox and it is visible false

i compare birthdate is not less than today
i take a compare validator control AND COMPARE birthdate to txttodaydate textbox
if i do todaydate texbox is visible false valu is not comapre
but i do visible true its comapre succeessfully.



I want to todaydate textxox is visible false

How to do plz help me

推荐答案

在服务器端代码中写入此代码:
Write this on server side code:
todayDate.Attributes.Add("display","none");



看看现在是否有效! (不要放置任何可见属性,默认情况下,它应该是visible = true并保留它)



See if it works now! (Don''t put any visible property, by default it should be visible=true and let it be)


这篇关于asp.net比较验证器控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆