0 Replies - 1045 Views - Last Post: 22 February 2017 - 07:34 AM Rate Topic: -----

#1 tommyx7   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 16-September 11

how to use User.IsInRole() in an html string within a javascript file

Posted 22 February 2017 - 07:34 AM

I have this javascript code in a separate file that uses an html template to create a modal with string specified in the code, my issue is that I have to use ASP.Net's User.IsInrole function within the html string, is this possible? is there a way in can do this?
define('templates', [], function () {
    

  this["JST"] = this["JST"] || {};
  this["JST"]["field-help.html"] = function (obj) { obj || (obj = {}); var __t, __p = '', __e = _.escape; with (obj) {__p += '<div class="modal-dialog">\r\n   <div class="modal-content">\r\n       <div class="modal-header">\r\n           <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\r\n           <h4 class="modal-title" id="myModalLabel">Field Help</h4>\r\n       </div>\r\n       <div class="modal-body">' + ((__t = (HelpText)) == null ? '' : __t) + '<br/><b>From Table:</b>' + ((__t = (TableName)) == null ? '' : __t) + '<br/><b>Data type:</b>' + ((__t = (FieldType)) == null ? '' : __t) + '</div>\r\n       <div class="modal-footer">\r\n           <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>\r\n       </div>\r\n   </div>\r\n</div>'; } return __p };  return this["JST"];

}); 


Is This A Good Question/Topic? 0
  • +

Page 1 of 1