Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / November 2005

Tip: Looking for answers? Try searching our database.

validation Summaries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ryan - 29 Nov 2005 19:17 GMT
I am having problems figuring out something I thought would be easy.

When you use a validation summary control on an ASP.NET page, how do you
suppress the RequiredFieldValidators from also displaying the error.

Thanks in advance,
Signature

Ryan

Steven Cheng[MSFT] - 30 Nov 2005 04:57 GMT
Hi Ryan,

Welcome to MSDN newsgroup.
Based on your description, my understanding on the question is that you'd
like to let only the validation Summary display the validation error (when
validtion fail.....) if there're both validator control and
validtionSummary control on the web page, yes?

Based on my understanding, the ValidationSummary's error message is just
retrieved from the actual Validator Control which raise the validation
error....   So we can not disable or use the Visible property to hidden the
validator control.  Currently I've tried using the clientside  css style  
"display:none" to hide the validator control's clientside element.  We need
to add the followig code in our page's code behind to register the client
style for the Validator control (which we don't want it to display error
message directly....)

RequiredFieldValidator1.Style["display"] = "none";

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: validation Summaries
| thread-index: AcX1GXvCK3T6ILGdTKGBnU8UZYvOgA==
[quoted text clipped - 25 lines]
|
| Thanks in advance,
Ryan - 30 Nov 2005 12:31 GMT
Drop the semi-colon and use rounded brackets so it will work in VB and it
works great:

RequiredFieldValidator1.Style("display") = "none"

Thanks for your help Steven.

Signature

Ryan

> Hi Ryan,
>
[quoted text clipped - 54 lines]
> |
> | Thanks in advance,
Steven Cheng[MSFT] - 30 Nov 2005 15:42 GMT
You're welcome Ryan,

Have  a good day!

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: validation Summaries
| thread-index: AcX1qfAJnMIiiWQiQxSRRlfp7uDKeQ==
| X-WBNR-Posting-Host: 142.206.2.11
| From: "=?Utf-8?B?Unlhbg==?=" <weeims@nospam.nospam>
| References:  <A8D34705-EB62-4303-9E70-3ABCA2C95559@microsoft.com>
<9##9bqW9FHA.4000@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: validation Summaries
| Date: Wed, 30 Nov 2005 04:31:07 -0800
[quoted text clipped - 80 lines]
| > |
| > | Thanks in advance,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.