Hi Betty,
Do you mean you created an ascx usercontrol for the functionality(a input
field with some validation controls associated with it)? Regarding on the
issue you mentiond, I think if you do want to make it a encapsulated and
reusable unit, we can consider use Custom Web Server control to encapsulate
them(instead of ascx user control), that'll be more flexible for reusing.
Also, if you're worried about the problem that not each one will need the
required validation, why not provide a certain Property e.g
"NeedValidation" on the custom control to control whether to generate the
validation sub controls at runtime. Thus, our custom control's user can set
this property at design-time or at runtime.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: user control issue
| thread-index: AcYi2RdvtGDwI/NpQSWFClLW3wRGDA==
| X-WBNR-Posting-Host: 64.85.224.187
| From: "=?Utf-8?B?YzY3NjIyOA==?=" <
[email protected]>
| Subject: user control issue
| Date: Thu, 26 Jan 2006 16:32:02 -0800
| Lines: 12
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:373887
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi all,
| If I developed a phone user control which has requiredfieldvalidator,
| regularexpressionvalidator etc. The quesiton is if on a web form which
have
| three
| phone fields and only any one of them is required, it seems in this case
| user control is not good choice.
| The only thing I can think of is eliminate the requiredfieldvalidator in
| user control,
| deal with required field in aspx page for the above case, am I right?
| Any other ways?
| --
| Betty
|