strange behaviour of static method
- by Cristian Boariu
Hi,
I load a js variable like this:
var message = '<%= CAnunturi.CPLATA_RAMBURS_INFO %>';
where the static string CPLATA_RAMBURS_INFO i put like:
public static string CPLATA_RAMBURS_INFO = "test";
I use it very well in this method.
<script type="text/javascript">
var categoryParam = '<%= CQueryStringParameters.CATEGORY %>';
var subcategoryParam = '<%= CQueryStringParameters.SUBCATEGORY1_ID %>';
var message = '<%= CAnunturi.CPLATA_RAMBURS_INFO %>';
function timedInfo(header) {
$.jGrowl(message, { header: header });
};
</script>
so the message appears.
I do not undersand, why, iso of "test", if i take the value from a static method,
ths use of message js var is no longer succesfull (the message no longer appears).
public static string CPLATA_RAMBURS_INFO = getRambursInfo();
public static string getRambursInfo()
{
return System.IO.File.ReadAllText(PathsUtil.getRambursPlataFilePath());
}
Any help would be highly appreciated....