验证控制头痛 [英] validation control headache

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

问题描述

验证控件令我头疼。这就是我想要做的事情,而且到目前为止我所尝试的还没有用。


我需要隐藏我的网格如果该页面无效

我该如何实现?


我有一个验证控件,如果没有数据则会出错

返回,所以如果页面在另一个搜索中无效,我需要将其移除

。如何在页面上隐藏和显示控件和标签基础。无效


有人在此之前完成此操作

The validation controls are giving me a headache. here is what i''m trying to
do and so far what I''ve tried has not worked.

I need to hide my grid if the page is not valid
how can i accomplish that?

I have one validation control that gives an error if there is no data
returned, so if the page is not valid on another search i need that to go
away. How can i hide and show controls and labels bases on the page.isvalid

has anyone done this before

推荐答案

为什么不检查代码中所需的数据?

看起来您使用验证器用于其他目的,因为

您的页面不应该回到所有验证后才会回发,直到所有验证都被传递给b $ b,除非你想做一些额外的服务器端验证,然后我就会认为你不需要验证网站对此的控制。

希望有所帮助。

Alex。

" NuB" < me@me.com>在消息中写道

新闻:O2 ************* @ TK2MSFTNGP12.phx.gbl ...
why dont you just check for the required data in the code?
it seem that you are using the validators for a different purpose, since
your page should not be ablt to postback until all validations are
passed...unless you want to do some extra server-side validation, and then I
think you dont need the validation web controls for that.
Hope that helps.
Alex.
"NuB" <me@me.com> wrote in message
news:O2*************@TK2MSFTNGP12.phx.gbl...
验证控件给了我头痛。这是我正在尝试做的事情,到目前为止,我尝试过的东西没有用。

如果页面无效,我需要隐藏我的网格我怎么能做到这一点?

我有一个验证控件,如果没有返回数据就会出错,所以如果页面在另一个搜索中无效,我需要去
走了。如何在
页面上隐藏和显示控件和标签。无效

有人在此之前完成此操作
The validation controls are giving me a headache. here is what i''m trying
to do and so far what I''ve tried has not worked.

I need to hide my grid if the page is not valid
how can i accomplish that?

I have one validation control that gives an error if there is no data
returned, so if the page is not valid on another search i need that to go
away. How can i hide and show controls and labels bases on the
page.isvalid

has anyone done this before



我没有关注;


会发生什么:我的网页上有4个文本框允许用户

进行搜索。

如果填充了所有文本框,则会填充带有结果的网格并显示

,那么如果用户

决定进行另一次搜索并且未命中一个文本框,显示所需的字段状态

缺少消息,那么如果

该消息是可见的,那么我需要隐藏之前的网格

成功搜索。


" Alex D." <人******** @ hotmail.com>在留言中写道

新闻:%2 *************** @ TK2MSFTNGP12.phx.gbl ...
i''m not following;

what happens is this: I have 4 text boxes on my web form to allow a user to
do a search.
If all textboxes are populated a grid with results is populated and
displayed, then if the user
decides to do another search and misses a textbox, the required field state
is missing message is displayed, THEN if
that message is visible I then need to hide the grid from the prior
successful search.


"Alex D." <al********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
为什么不给你只是在代码中检查所需的数据?
看起来你正在使用验证器用于不同的目的,因为
你的页面不应该在所有验证通过之前回复。 ..你想要做一些额外的服务器端验证,然后
我认为你不需要验证网页控件。
希望有所帮助。
Alex。

" NuB" < me@me.com>在消息中写道
新闻:O2 ************* @ TK2MSFTNGP12.phx.gbl ...
why dont you just check for the required data in the code?
it seem that you are using the validators for a different purpose, since
your page should not be ablt to postback until all validations are
passed...unless you want to do some extra server-side validation, and then
I think you dont need the validation web controls for that.
Hope that helps.
Alex.
"NuB" <me@me.com> wrote in message
news:O2*************@TK2MSFTNGP12.phx.gbl...
验证控件令我头疼。这是我正在尝试做的事情,到目前为止,我尝试过的东西没有用。

如果页面无效,我需要隐藏我的网格我怎么能做到这一点?

我有一个验证控件,如果没有返回数据就会出错,所以如果页面在另一个搜索中无效,我需要去
走了。如何在
页面上隐藏和显示控件和标签。无效

有人在此之前完成此操作
The validation controls are giving me a headache. here is what i''m trying
to do and so far what I''ve tried has not worked.

I need to hide my grid if the page is not valid
how can i accomplish that?

I have one validation control that gives an error if there is no data
returned, so if the page is not valid on another search i need that to go
away. How can i hide and show controls and labels bases on the
page.isvalid

has anyone done this before




我认为你应该阅读一些关于验证器的信息...验证器不是用于显示消息的
,你可以使用它们来保持用户在页面中

直到所有必需的字段(文本框,单选按钮,复选框等等)都经过验证。
已经过验证。我在上一条消息中说的是,你可以只需要检查你的文本框中的ex:if(this.TextBox1.Text!=""){// do

something}


alex。


" NuB" < me@me.com>在留言中写道

news:%2 *************** @ TK2MSFTNGP12.phx.gbl ...
I think you should read a little bit about validators...validators are not
just for displaying messages, you can use them to keep the user in the page
until all requiered fields (textboxes, radiobuttons, checkboxes, etc..) are
validated. What I was saying in the previous message is that you can just
check your textboxes for a value ex: if ( this.TextBox1.Text != "" ) {//do
something}

alex.

"NuB" <me@me.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
i''我没有关注;

会发生什么:我的网页上有4个文本框,允许用户进行搜索。
如果所有文本框都填充了网格填充结果并显示,然后如果用户决定进行另一次搜索并错过文本框,则显示必填字段状态缺失消息,然后如果
消息是可见的然后我需要隐藏先前成功搜索的网格。


Alex D. <人******** @ hotmail.com>在消息中写道
新闻:%2 *************** @ TK2MSFTNGP12.phx.gbl ...
i''m not following;

what happens is this: I have 4 text boxes on my web form to allow a user
to do a search.
If all textboxes are populated a grid with results is populated and
displayed, then if the user
decides to do another search and misses a textbox, the required field
state is missing message is displayed, THEN if
that message is visible I then need to hide the grid from the prior
successful search.


"Alex D." <al********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
为什么不检查一下代码中需要的数据?
您似乎将验证器用于不同的目的,因为在您通过所有验证之前,您的页面不应该回复...除非您想要做一些额外的服务器端验证,然后我认为你不需要验证网页控件。
希望有所帮助。
Alex。

" NUB" < me@me.com>在消息中写道
新闻:O2 ************* @ TK2MSFTNGP12.phx.gbl ...
why dont you just check for the required data in the code?
it seem that you are using the validators for a different purpose, since
your page should not be ablt to postback until all validations are
passed...unless you want to do some extra server-side validation, and
then I think you dont need the validation web controls for that.
Hope that helps.
Alex.
"NuB" <me@me.com> wrote in message
news:O2*************@TK2MSFTNGP12.phx.gbl...
验证控件令我头疼。这就是我想要做的事情,到目前为止我所尝试的还没有用。

如果页面无效,我需要隐藏我的网格我该如何实现?

如果没有返回数据,我有一个验证控件会出错,所以如果页面在另一个搜索中无效,我需要<走开。走开。如何在
页面上隐藏和显示控件和标签。无效

有人在此之前完成此操作
The validation controls are giving me a headache. here is what i''m
trying to do and so far what I''ve tried has not worked.

I need to hide my grid if the page is not valid
how can i accomplish that?

I have one validation control that gives an error if there is no data
returned, so if the page is not valid on another search i need that to
go away. How can i hide and show controls and labels bases on the
page.isvalid

has anyone done this before





这篇关于验证控制头痛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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