使用Feather和aspx的未终止的字符串文字

时间:2014-10-24 19:12:30

标签: javascript asp.net asp.net-mvc aviary

我有一个aspx页面,我想在点击一个按钮后启动一些javascript。像这样......

  <p><input type='image' src='http://images.aviary.com/images/edit-photo.png' value='Edit photo' onclick="return launchEditor('imgClub', ' <%= imgClub.ImageUrl.ToString()%> ');" /></p>

javascript在下面(它是Adobe的Aviary / Feather)

<script type='text/javascript'>
   var featherEditor = new Aviary.Feather({
       apiKey: 'your-key-here',
       apiVersion: 3,
       theme: 'dark', // Check out our new 'light' and 'dark' themes!
       tools: 'all',
       appendTo: '',
       onSave: function(imageID, newURL) {
           var img = document.getElementById(imageID);
           img.src = newURL;
       },
       onError: function(errorObj) {
           alert(errorObj.message);
       }
   });
   function launchEditor(id, src) {
       featherEditor.launch({
           image: id,
           url: src
       });
      return false;
   }
</script>

问题是我在

<% imgClub.ImageUrl.ToString()%>收到错误
onclick="return launchEditor('imgClub', ' <%= imgClub.ImageUrl.ToString()%> ');"

0 个答案:

没有答案