Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am developing a web application where a link is defined in src of the javascript in master page. I want to define a config key and use it in the src. Can anyone help
Posted

1 solution

try:
you can access it with ConfiguarionSettings.AppSettings["Key"] within server tags such as:

in javascript :
JavaScript
var time;
 time = '<%= ConfigurationSettings.AppSettings["FinalExamTime"] %>'

or as:
ASP.NET
<img id="ImgHeader"  runat="server" src="<%= ConfigurationSettings.AppSettings["ImagePath"] %>" />
 
Share this answer
 
v6
Comments
Sandeep Mewara 14-May-12 5:12am    
Comment from OP:
thanks a lot .. it worked
i tried it and now it is wokring fine by giving the value there
Sandeep Mewara 14-May-12 5:13am    
Take my 5 for resolving OP's issue! :)
member60 14-May-12 6:06am    
hello Sandeep.if you don't mind will you please tell what this OP means ?
i am not getting it.
Sandeep Mewara 14-May-12 8:20am    
Which one? This OP already was happy with your answer and said your answer worked for him. Good job.
member60 15-May-12 0:02am    
"Comment from OP:" in this what/who is OP ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900