/////////////////// In your web config file
///////////////////////////// for the variable
<appSettings>
<add key="Key" value="this is test"
/>
</appSettings>
///////////////// In aspx file
<asp:TextBox ID =
"txtBox1" runat
= "server"
Text="<%=System.Configuration.ConfigurationManager.AppSettings["Key"]%>" />
///////////////////////////// for the variable
<script type="text/javascript">
$(document).ready(function () {
var my1
= '<%=ConfigurationManager.AppSettings["Key"].ToString()
%>';
alert(my1);
});
</script>
No comments:
Post a Comment