2011-09-07 3 views
0

이항 함수를 호출되지는 아래의 코드는 코드 뒤에 어떤 일이 일어나고있다

Dim test1 As HtmlGenericControl = CType(e.Item.FindControl("test1"), HtmlGenericControl) 
     Dim image As HtmlGenericControl = CType(e.Item.FindControl("imgFullImage"), HtmlGenericControl) 
     hypImageProduct.Attributes.Add("onMouseOver", 
             "ShowContent('" + test1.ClientID + "');document.getelementbyid('" + image.ClientID + "').src ='binary('" + Convert.ToBase64String(New DataClass().getProductStockPhoto(image.Attributes("alt"), 40, 40)) + "')';") 

그런 다음 바이너리에 대한의 OnPage 사용하지만, 어떤 이유로 그것을 것으로 보인다 기능입니다 호출되고 있지 않습니다.

function binary(d) { 
     var o = ''; 
     for (var i=0; i<d.length; i=i+2) o+=String.fromCharCode(eval('0x'+(d.substring(i,i+2)).toString(16))); 
     return o; 
    } 

저는 어리 석고 눈치 채지 못하고 있지만 제대로 작동해야한다고 생각합니다.

답변

0

함수 호출과 관련하여 여분의 아포스트로피가 있습니다. 이 변경 :

... +"').src ='binary('" + ... + "')';") 

로 :

... +"').src = binary('" + ... + "');") 
관련 문제