Use the following:
var value = System.Configuration.ConfigurationManager.AppSettings["imagetype"];
You may find that for it to work you need to add a link to System.Configuration.dllif you do not already have it.
Create a new page, and in Page_Load place the line so that it reads everything:
Response.Clear();
var value = System.Configuration.ConfigurationManager.AppSettings["imagetype"];
Response.Write(value);
Response.End();
Now you can make an AJAX call on the page from Javascript, possibly using ExtJs , and the text will be returned to your javascript.
:
<script language="javascript" type="text/javascript">
var appSettingValue = '<%=System.Configuration.ConfigurationManager.AppSettings["imagetype"]%>';
alert(appSettingValue);
</script>