Parser Error Message: The server tag is not well formed. ImageButton - eval

<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="<%# DataBinder.Eval("ProdImagePath","/Images/{0}") %>" />
I have retrieved the ProdImagePath from the database and Images is the internal folder which has Images and I am trying to retrieve the image from that folder

Related

Central location for image folder path and 404 on directory

I am loading an image name and extension from a database. In my AngularJS controller i get the product by ID (calling my MVC WebAPI) and load the product details along with the image, so far all works but i keep getting a 404 listed in the console window with this line
<img ng-src="../customFolder/{{vm.Customer.FaceImage}}" alt="image" width="120" height="120"/>
The 404 error is
GET https://localhost:11123/customFolder/ 404
I know customFolder exists so i dont understand why that is happening?
Is there a more clearer way to store the parent paths so when the HTML references that path in multiple places i can set it under one location so if in future i make a change i can do it from one location rather than multiple?

How to display the image in SSRS using the imagepath from database. The image path is given as images/image1.png in database

I am working in SSRS reports in that I need to display the logo for the report. I am having the image path in database like images/image1.png.i have used the external and database as the image source. But still no image is found in the logo.
Image path prefix with 'File:FilePath' For Example
'File:D:\logo.jpg'

How to cache images for offline display in a browser control in Windows Phone

I want to retrieve some HTML content from the web (for example RSS feed), save it for offline use and then display it in a Web Browser control in a Windows Phone application. I can easily save the content as a string and use NavigateToString() method to display the HTML but what do I do with the images? I can download them and save them and even replace the src attribute of the img tags but how do I intercept the image loading in the web browser control and feed it images from the local database?
Well you will have problem with any asset, not only images (unless you're talking about HTML without any external javascript or CSS). You could possibly have a method to detect asset sources (<script src=""> or <img src=""> or <link href=""> are some obvious examples). Then you would download that asset as a local file. Then when you're displaying it, you would replace all assets in your HTML string with local copies instead.
I haven't worked on Windows Phone at all but I think your solution would be around these lines.
I ended parsing the HTML downloading the images and replacing the src attribute with the local file name. Then I saved the html in the local storage so that relative links continue to work. Sadly I did not find a way to store the content in the database because if I used NavigateToString to provide the HTML I cannot provide the image data.

must the silverlight plugin object tag be contained within a form

Looking at the sample .html file generated on a silverlight 4 project we see that the object tag is inside a form. (and the form has runat="server" for that matter)
Is there a reason that the plug-in must be within a form, and for that matter what does runat="server" mean in an html file (note I understand it's purpose in an aspx file)
Nope it doesn't need to be in a Form. Even when using ASPX I tend to remove all the extra paraphenalia that comes with a default template for an ASPX page.
In html runat="server" means nothing unless someone has mapped html extension to the ASP.NET processor which would be quite a weird thing to do.

How to embed Silverlight control in blog page?

How can I embed a demonstration applet written in Silverlight within a blog post? Is it possible to do so using any hosted blog engines, or only using a blog engine that I host myself?
I assume that I will need to use the same tags and .js as in a regular (X)HTML page with a SL control. Are there any hosted blog engines that will permit me to enter this? (Is it possible with blogger?)
Does the SL security model mean that the XAP file need to be hosted on the same site as the blog pages itself?
You can host a Silverlight app in HTML using the <object> tag, there is no need for the blog host to understand any of this. There is no server side element to hosting a Silverlight app its a purely client side thing.
<object id="SL" data="data:application/x-silverlight-2," type="application/x-silverlight-2" style="width:400px; height:300px">
<param name="source" value="MySLApp.xap" />
<param name="minRuntimeVersion" value="3.0.40624.0 />
<param name="initParams" value="someParam=value" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" style="border-style: none" alt="Get Microsoft Silverlight" />
</a>
</object>
In this case the Silverlight app "MySLApp.xap" is placed in the same folder as the HTML page using it. However it could be on a different server if you like. However access to the HTML Bridge will be blocked but then if your app is self contained and does not need to communicate with the host page then there is no problem.
I created a Silverlight xap to host hero images OR video in my wordpress theme - I pass the content to it using initparams and custom fields per post.
That way I can use the same xap to host videos with media controls if appropriate or images with cool fade ins/click effects
example image post:
http://www.blackspike.com/site/html/display-google-docs-spreadsheets-in-wordpress
example video post (click vid for controls):
http://www.blackspike.com/site/wpf/hanselmans-babysmash
Both using the same xap!
An easy solution that worked for me is just to use an iFrame. So I published the regular TestPage.html generated by Visual Studio to my web site (along with the .XAP file of course) and then embedded it:
<iframe src="http://www.lostbearlabs.com/sl/Spring001/TestPage.html" frameborder="0" width="400" height="400" scrolling="no" ></iframe>
Using blogger, I discovered this gotcha: Any attempt to make the HTML pretty (e.g. by splitting it into separate lines) causes blogger to insert spurious <br> tags into the output, even if I do my edits using the "Edit HTML" view. So the iFrame tag must all be on a single line!!
You might want to check your host has the required MIME types mapped:
http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/
according to this Server 2008 IIS7 should work out of the box but IIS6 may require MIME types adding...
The solution marked as answer above works well if the HTML page and the Silverlight xap file are hosted on the same server.
As this is not possible in most of the cases, as most of the bloggers use either blogger/WordPress. We do not have any way of setting the mime type on these hosting providers.
Here is a good link which explains in detail regarding hosting an Silverlight application in blogger.

Resources