R
Roel
Hi all,
I'm using the new profile system which is introduced in ASP.NET 2.0.
In the WEB.CONFIG the profile is configured like this:
<profile enabled="true" defaultProvider="SqlProvider">
<providers>
<clear />
<add name="SqlProvider"type="System.Web.Profile.SqlProfileProvider"
connectionStringName="remoteConnection" applicationName="/" />
</providers>
<properties>
<add name="CreationDate" type="System.DateTime" readOnly="true" />
<add name="FirstName" type="System.String" />
<add name="Infix" type="System.String" />
<add name="LastName" type="System.String" />
</properties>
</profile>
Instead of using "Profile.FirstName", in the aspx in which the
profile-properties can be edited, I read the WEB.CONFIG with the
WebConfigurationManager class to get the properties run-time. Depending on
the type-attribute I create a textbox, checkbox, etc. to display/edit the
property. When I create a new property in the WEB.CONFIG, the aspx does not
need to be altered for enabling editing the new property.
I want this mechanism to be more flexible; what I want to know is how to
extend the property-declaration in the web.config (e.g. <add name="LastName"
type="System.String" myAttribute="uppercase" getDataFrom="tblNames" />)?
Greetings,
Roel
I'm using the new profile system which is introduced in ASP.NET 2.0.
In the WEB.CONFIG the profile is configured like this:
<profile enabled="true" defaultProvider="SqlProvider">
<providers>
<clear />
<add name="SqlProvider"type="System.Web.Profile.SqlProfileProvider"
connectionStringName="remoteConnection" applicationName="/" />
</providers>
<properties>
<add name="CreationDate" type="System.DateTime" readOnly="true" />
<add name="FirstName" type="System.String" />
<add name="Infix" type="System.String" />
<add name="LastName" type="System.String" />
</properties>
</profile>
Instead of using "Profile.FirstName", in the aspx in which the
profile-properties can be edited, I read the WEB.CONFIG with the
WebConfigurationManager class to get the properties run-time. Depending on
the type-attribute I create a textbox, checkbox, etc. to display/edit the
property. When I create a new property in the WEB.CONFIG, the aspx does not
need to be altered for enabling editing the new property.
I want this mechanism to be more flexible; what I want to know is how to
extend the property-declaration in the web.config (e.g. <add name="LastName"
type="System.String" myAttribute="uppercase" getDataFrom="tblNames" />)?
Greetings,
Roel