Dynamic value in code

Last post 01-23-2009, 9:46 AM by Photoshop_God. 2 replies.
Sort Posts: Previous Next
  •  01-23-2009, 1:54 AM 48000

    Dynamic value in code

    If I write this in hard code, it works fine:
    editor1.PasteHTML("<img src='http://www.wood-it.be/Carpenters/CarpentersAlbumPicturesLogo.asp?idCarp=2530'>");
     
    but the value of idCarp= is dynamic and if I write it this way, it does not work:
    editor1.PasteHTML("<img src='http://www.wood-it.be/Carpenters/CarpentersAlbumPicturesLogo.asp?idCarp="&pidCarp&"'>");
    and it is normal.

    I also have tried this:
    myVallue = "<img src='http://www.wood-it.be/Carpenters/CarpentersAlbumPicturesLogo.asp?idCarp=" & pidCarp & "'>"
    editor1.PasteHTML(myValue)
     
    but that does not work either.
     

    How could I bypass this ?
  •  01-23-2009, 8:36 AM 48007 in reply to 48000

    Re: Dynamic value in code

    Ok, I solved it this way:
     
    var MaVar = "<%=myValue%>";
    editor1.PasteHTML(MaVar);       
    return true;
  •  01-23-2009, 9:46 AM 48012 in reply to 48007

    Re: Dynamic value in code

    Hi Mvu,
     
    You treat it just like you did.  Change the code in red. 
     
     
    editor1.PasteHTML("<img src='http://www.wood-it.be/Carpenters/CarpentersAlbumPicturesLogo.asp?idCarp=<%= idCarp %>'>");
     
     
    Hope this helps.
     
     
    Marty
View as RSS news feed in XML