Calling global page code

Topics: Web Client Software Factory
Apr 18, 2007 at 9:39 PM
In the reference application file newTransferView.aspx.cs the InitializeCulture method is overridden with code that looks like it could qualify as site wide global code that sets culture. How would you use the WCSF block to get your pages to call this code without creating a basepage (want to avoid a page controller) or duplicating the code on every page?
Coordinator
Apr 19, 2007 at 12:51 PM
Hi avdean. If you would like to set the culture in every request, you could do this on the global.asax file. Just create an application event handler (or override PrePageExecute for example) and put your code there.
Notice that if you want to specify a culture for the whole application (and not a different one on every request) you should do this in your web.config file.

Please let me know if this helps,
Julián Domínguez
staff.southworks.net/blogs/jdominguez
Apr 19, 2007 at 1:52 PM
Ah yes, thanks Julian. I see in the reference application this was done.