Question : Compiler Error Message: CS1012: Too many characters in character literal

I am trying to create a string in a javascript function to resolve path for an image handler url, but I am getting the following error:

Compiler Error Message: CS1012: Too many characters in character literal

The Javascript function code is given in the Code section. The following line is highlighted red as the error:

var ImageUrlPath = <%= sting.format('PicHandler.ashx?Src={0}&ImgId={1}&CallingSource={2}&maxHeight={3}&maxWidth={4}, "HWDetails",' + HImgID.ClientID + ', "EnlargedImage",' + 600 + ',' + 600 + ';' ) %>

Please help me fix error in this line.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
function ChangeCursor()
    {
        this.className ='linkClassPointer';
       var control = document.getElementById('<% =HPost.ClientID %>').value;
        alert (control);
        
        if ((control==null) || (control=="") || (control.length==0))
             var x=1
        else
        {
            alert(control);
            var ImageRightPaneID=document.getElementById('<% =ImageRightPane.ClientID%>');
            var imgID = document.getElementById('<% =HImgID.ClientID %>').value;
            
            var ImageUrlPath = <%= sting.format('PicHandler.ashx?Src={0}&ImgId={1}&CallingSource={2}&maxHeight={3}&maxWidth={4}, "HWDetails",' + HImgID.ClientID + ', "EnlargedImage",' + 600 + ',' + 600 + ';' ) %>
            var imageSrc = <%= ResolveClientUrl(ImageRightPane.ImageUrl) %>; 
            
            
            ImageRightPaneID.onclick = "ImageRightPaneID.src='" + ImageSrc + "'";
 
           
            
                                   
            }
        
        return false;
    }

Answer : Compiler Error Message: CS1012: Too many characters in character literal

The same problem as above, need enclosing quotes

var imageSrc = '<%= ResolveClientUrl(ImageRightPane.ImageUrl) %>';
Random Solutions  
 
programming4us programming4us