Home All Groups Group Topic Archive Search About

change web.config programmatically

Author
2 Jun 2006 4:29 AM
arlene
hi,
i already created an app_theme folder in the project and configured the
pagesection of we.config to assign my desired theme. but my problem is how
can i change the value of styleSheetTheme in the pagesection of web.config
everytime the user select a theme from the dropdown control in a page so that
it applies to the whole project not just in a one page. hope you can help me.
thank you!

Author
2 Jun 2006 2:14 PM
Brock Allen
It sounds like to me that you want to dynamically change the Theme for the
user? If this is what you want to do, check out the Page_PreInit event --
this event is for dynamically assigning the Theme for the Page being requested.
So you can allow the user to choose their Theme preference and store that
in a database or in the Profile, and the load it in Page_PreInit.

-Brock
http://staff.develop.com/ballen


Show quoteHide quote
> hi, i already created an app_theme folder in the project and
> configured the pagesection of we.config to assign my desired theme.
> but my problem is how can i change the value of styleSheetTheme in the
> pagesection of web.config everytime the user select a theme from the
> dropdown control in a page so that it applies to the whole project not
> just in a one page. hope you can help me. thank you!
>
Author
8 Jun 2006 6:19 AM
arlene
thank you so much for the immediate reply.

Show quoteHide quote
"Brock Allen" wrote:

> It sounds like to me that you want to dynamically change the Theme for the
> user? If this is what you want to do, check out the Page_PreInit event --
> this event is for dynamically assigning the Theme for the Page being requested.
> So you can allow the user to choose their Theme preference and store that
> in a database or in the Profile, and the load it in Page_PreInit.
>
> -Brock
> http://staff.develop.com/ballen
>
>
> > hi, i already created an app_theme folder in the project and
> > configured the pagesection of we.config to assign my desired theme.
> > but my problem is how can i change the value of styleSheetTheme in the
> > pagesection of web.config everytime the user select a theme from the
> > dropdown control in a page so that it applies to the whole project not
> > just in a one page. hope you can help me. thank you!
> >
>
>
>
Author
8 Jun 2006 6:45 AM
arlene
i test the project using your suggestion but it doen't work. i first add the
script in the global.asax and add the pageevent.cs and the ddl and then run.
but i encountered an error that says, " the type or namespace name
'PageEventArgs' could not be foune". hope we can fix it. thank you

Show quoteHide quote
"Brock Allen" wrote:

> It sounds like to me that you want to dynamically change the Theme for the
> user? If this is what you want to do, check out the Page_PreInit event --
> this event is for dynamically assigning the Theme for the Page being requested.
> So you can allow the user to choose their Theme preference and store that
> in a database or in the Profile, and the load it in Page_PreInit.
>
> -Brock
> http://staff.develop.com/ballen
>
>
> > hi, i already created an app_theme folder in the project and
> > configured the pagesection of we.config to assign my desired theme.
> > but my problem is how can i change the value of styleSheetTheme in the
> > pagesection of web.config everytime the user select a theme from the
> > dropdown control in a page so that it applies to the whole project not
> > just in a one page. hope you can help me. thank you!
> >
>
>
>
Author
8 Jun 2006 7:35 AM
arlene
i fixed the error. but i have a configuration errr in the httmodules section
in the web.config. in addition, do you s sample code where can i change the
value of the theme that i assign in the global asax? thank you.

Show quoteHide quote
"arlene" wrote:

> i test the project using your suggestion but it doen't work. i first add the
> script in the global.asax and add the pageevent.cs and the ddl and then run.
> but i encountered an error that says, " the type or namespace name
> 'PageEventArgs' could not be foune". hope we can fix it. thank you
>
> "Brock Allen" wrote:
>
> > It sounds like to me that you want to dynamically change the Theme for the
> > user? If this is what you want to do, check out the Page_PreInit event --
> > this event is for dynamically assigning the Theme for the Page being requested.
> > So you can allow the user to choose their Theme preference and store that
> > in a database or in the Profile, and the load it in Page_PreInit.
> >
> > -Brock
> > http://staff.develop.com/ballen
> >
> >
> > > hi, i already created an app_theme folder in the project and
> > > configured the pagesection of we.config to assign my desired theme.
> > > but my problem is how can i change the value of styleSheetTheme in the
> > > pagesection of web.config everytime the user select a theme from the
> > > dropdown control in a page so that it applies to the whole project not
> > > just in a one page. hope you can help me. thank you!
> > >
> >
> >
> >