Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 7th, 2004, 06:13 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default Web.Config in Javascript

Hi Experts,

Can anyone find solution to this simple but serious problem.

My web application has several pages. All the pages have a header control (user control) added to each of these pages. Now, I am using a javascript variable througout my application which is defined in this header control (this variable is like a constant whose best position is in the web.config). Therefore, if I move this variable to a key in the Web.config, is there any method to assign its value in the web.config by doing something only in the header control?. I dont want to modify each and every page.

thanks in advance
Ganesh

Regards
Ganesh
__________________
Regards
Ganesh
http://ganeshprof.blogspot.com
Find your solution here...
 
Old October 29th, 2004, 11:28 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I don't know if there is a way to programmatically modify the web.config settings (and personally feel that if you could do it, you shouldn't).

I'm also confused by what you are saying. You say that this value is "like a constant", but you than say that you want to change it in the header? So then it is NOT a contant. Which is it?

If you need to dynamically set a value, then you need some programmatic method of persisting it. It sounds to me like using the Session would solve the problem. Assign a session value in the header control, then you can just use that value on the pages that need it.

Is this what you are looking for?





Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config vs. app.config darlo Visual Studio 2005 11 August 20th, 2008 07:23 AM
web.config rrkano .NET Framework 2.0 1 June 23rd, 2008 02:50 PM
Web Config SteveP55419 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 January 3rd, 2007 04:19 PM
Web.Config tranzformerz ASP.NET 1.0 and 1.1 Basics 1 August 29th, 2005 05:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.