validationg custom properties tool part
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
validationg custom properties tool part

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development
Author Message
jrmcdona
Guest





Posted: Thu Jan 06, 2005 3:07 am    Post subject: validationg custom properties tool part Reply with quote

Lets say I have a custom property that is a text box that can be a range of
numbers.

How would i validate this and raise an error label if the validation fails???

Thanks for your help!

jrmcdona
Back to top
Michael Christensen
Guest





Posted: Thu Jan 06, 2005 5:21 am    Post subject: Re: validationg custom properties tool part Reply with quote

jrmcdona wrote:
Quote:
Lets say I have a custom property that is a text box that can be a range of
numbers.

How would i validate this and raise an error label if the validation fails???

Thanks for your help!

jrmcdona

The validation should be placed in the ApplyChanges() method, where you
can compare the value currently in your Toolparts textbox with the
accepted range.

If you determine that it is within the accepted range, you assign its
value to the Webparts custom property, if not you could make visible an
otherwise hidden label with your error message.

This should ensure that you never get invalid data persisted to your
custom property.

Hope this helps.

Regards
Michael Christensen
Danish Agricultural Advisory Service
www.landscentret.dk
---------------------
The views expressed here are personal and do not necessarily reflect the
views of my employer
Back to top
jrmcdona
Guest





Posted: Thu Jan 06, 2005 5:37 am    Post subject: Re: validationg custom properties tool part Reply with quote

Cool thanks. Doesnt sound to hard. I just need to figure how to render the
error label onto my tool pane!

thanks for your time...


"Michael Christensen" wrote:

Quote:
jrmcdona wrote:
Lets say I have a custom property that is a text box that can be a range of
numbers.

How would i validate this and raise an error label if the validation fails???

Thanks for your help!

jrmcdona

The validation should be placed in the ApplyChanges() method, where you
can compare the value currently in your Toolparts textbox with the
accepted range.

If you determine that it is within the accepted range, you assign its
value to the Webparts custom property, if not you could make visible an
otherwise hidden label with your error message.

This should ensure that you never get invalid data persisted to your
custom property.

Hope this helps.

Regards
Michael Christensen
Danish Agricultural Advisory Service
www.landscentret.dk
---------------------
The views expressed here are personal and do not necessarily reflect the
views of my employer
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB