Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2005, 03:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default Error rendering Validator control

Hello,

I have a composite control that has a validator in it, but the weird thing is, I have another composite control and the validator works in one, but not in the other. I have the same settings (just copied over); I can't figure it out. In CreateChildControls I have:


rfvSearchText = New RequiredFieldValidator

With rfvSearchText

.ID = "rfvSearchText"

.Display = ValidatorDisplay.Static

.Text = "*"

.ErrorMessage = "Please enter search text"

.ToolTip = .ErrorMessage

.ControlToValidate = txtSearchText.ID

End With

And in the Render method, I render it as such:


If (Me.SearchTextRequiredErrorMessage <> String.Empty) Then

rfvSearchText.RenderControl(writer)

End If

It renders, but it shows by default, whereas the other one is hidden. Any idea why the * appears by default? This is at runtime, not design time. The * appears for the first control, but it properly hides it for the second one.

Thanks.

Brian
__________________
Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
error rendering control pnlAddEdit in Wrox Blog admwta ASP.NET 2.0 Basics 2 July 31st, 2008 10:48 AM
validator control error amit.jagtap ASP.NET 1.0 and 1.1 Basics 2 October 1st, 2007 07:07 AM
User Control not rendering in Master Page skmcusp ASP.NET 2.0 Basics 2 September 10th, 2007 04:58 PM
Control validator Lofa ASP.NET 1.0 and 1.1 Basics 0 February 21st, 2006 01:57 PM
DataGrid Controls Within custom validator control geetha_ganesan ADO.NET 1 March 26th, 2005 04:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.