DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 07 Jun 2007 06:48:29 -0700,    posted on: microsoft.public.dotnet.framework.aspnet.buildingcontrols        back       

Thread Index
  1    unknown
          2    John Saunders [MVP] john.saunders at trizetto.com


Problem with order that properties are set from aspx page   
Hi

I've developed an ASP.NET server control with 2 properties, PropertyA
and PropertyB. The setter for PropertyB uses the value of PropertyA to
perform some checking when set at designtime.

When the aspx page is opened in the designer, the properties are read
in from the aspx markup  but the order the properties are set can't be
guarenteed. Sometimes the setter for PropertyB is called before the
setter for PropertyA and the code falls over.

Is there a way, at designtime, to get round this? E.g. force one
property to be set from the designer before another etc?

Cheers

Andy
Date:Thu, 07 Jun 2007 06:48:29 -0700   Author:  

Re: Problem with order that properties are set from aspx page   
wrote in message 
news:1181224109.548543.39330@q69g2000hsb.googlegroups.com...

> Hi
>
> I've developed an ASP.NET server control with 2 properties, PropertyA
> and PropertyB. The setter for PropertyB uses the value of PropertyA to
> perform some checking when set at designtime.
>
> When the aspx page is opened in the designer, the properties are read
> in from the aspx markup  but the order the properties are set can't be
> guarenteed. Sometimes the setter for PropertyB is called before the
> setter for PropertyA and the code falls over.
>
> Is there a way, at designtime, to get round this? E.g. force one
> property to be set from the designer before another etc?


I don't think there's a way to do this, and it would not be a good idea. 
What would happen if the designer weren't used? What if the properties were 
set in markup?

The order of setting properties should not matter. If you need property A in 
property B, you should first check to see if it has been set.
-- 
John Saunders [MVP]
Date:Thu, 7 Jun 2007 13:46:34 -0400   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us