RE: How to use a variable in web.config

From: Ibrahim Shameeque (IbrahimShameeque_at_discussions.microsoft.com)
Date: 08/12/04


Date: Thu, 12 Aug 2004 05:29:02 -0700

Hi,
Store the value in a variable in code behind. Something like

Public serverval as string = configurationsettings.appsettings("configval")

Now in java script call a function which has something like

var val=<%=serverval %>;
windows.alert(val);

Call this function after the body load event. Thanks - Ibrahim

"ad" wrote:

> I have a Asp.Net project, it use JScript to program the client's script
> I declare a variable in web.config like:
> <add key="CompanyName" value="Big Salse company" />
>
> How can I use the CompanyName in my jscript?
>
>
>
>
>



Relevant Pages

  • Re: Storing a value for later use in vba or a Macro
    ... Dim strCurrentCustomer as String ... do you programmatically store a value from one record to use in ...
    (microsoft.public.access.gettingstarted)
  • Re: Storing wave files in database
    ... analyse them and store everything in some sort of database. ... You don't store the Wave files in the database. ... ByVal lpOperation As String, _ ... Dim lRet As Long, varTaskID As Variant ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: adding data to a file before it gets regexed
    ... The reasion I am trying to add the string to the line, is so that I can use ... it is not a good idea to store entire files in memory and it is really ... the arrays are the contents of the files broken down by lines. ... Any opinion expressed in this e-mail is personal to the sender ...
    (perl.beginners)
  • Re: Question about a data structure
    ... I'll store the ... string, it could just be a simgle 150 character string. ... , personally, I'd avoid 'stringing' together responses. ...
    (alt.php)
  • Re: Java Applet saving results on home server
    ... I can also store the results to a string and write that to a ... that has some data structures to store all the things I need, ... This puts you right back into your original question. ... I've got a problem with the Jakarta ftp client. ...
    (comp.lang.java.help)