locked
unable display a thumbnail while sharing html content when image has a space in its name

    Question

  • I am trying to implement the share contract where in I am trying to share HTML content in which there is an image tag for which the source is appended dynamically. The image is displayed well when there is no space in

    the image name. The image is not displayed when there is a space in the name of the image.

    Below is the code I am using

    String^ htmlFormat = HtmlFormatHelper::CreateHtmlFormat("<table cellpadding=""7""><tr><td><img src=\""+serviceItemPath+"\"/></td><td>"+m_pTargetServiceItem->Name+"<br/><a>"+m_ShareCharmUri->DisplayUri+"</a></td></tr></table>");
    
    
    					
    					RandomAccessStreamReference^ streamRef = 
    						RandomAccessStreamReference::CreateFromUri(ref new Uri(serviceItemPath));
    
    					
    
    					m_dShareCharmDataPackage->ResourceMap->Insert(serviceItemPath,streamRef);
    
    					m_dShareCharmDataPackage->SetHtmlFormat(htmlFormat);
    				

    Monday, December 17, 2012 12:28 PM

All replies