Tuesday, August 18, 2015

asp.net access c# variable in javascript

1)  asp.net code behind
 public partial class UploadMultipleFiles : System.Web.UI.Page
    {
        public string eCabinetbaseURL = Functions.ToString(ConfigurationManager.AppSettings["eCabinetServiceUrl"]);

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }

2)  In Javascript function

 var eCabinetServiceUrl = '<%=eCabinetbaseURL%>';


No comments:

Post a Comment