FreeTextBox

The no. 1 free ASP.NET HTML Editor.
Welcome to FreeTextBox Sign in | Join | Help
in Search

Image just won't display no matter what I do... NOT using ImageGallery (yet)

Last post 09-20-2008, 6:38 PM by Ross Holland. 0 replies.
Sort Posts: Previous Next
  •  09-20-2008, 6:38 PM 9462

    Image just won't display no matter what I do... NOT using ImageGallery (yet)

    Dear all,

    Have created simple HTML page with an image embedded. Not created through FTB and not using ImageGallery yet, as I already have these html files from older version of the site and just want to display them. Image file is in same folder as html page. Example as:

    <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta http-equiv="Content-Language" content="en-gb">

    <title>Mary Stuart</title></head>

    <body  ><p>
    <img src="Mary Stuart.jpg" alt="" width="75" height="110" style="float: left"><strong>The history play that Shakespeare should have written<br>
    </strong></p>
    </body></html>

    Run this in a browser, it works fine.

    aspx page with FreeTextBox finds file and loads it. no problem. Code for aspx page is:

    <%@ Page Explicit="true" language="VB" CodeFile="MainCode.aspx.vb" Inherits="_Default" masterpagefile="mysite.master" %>
    <%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

    <script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
       If Not IsPostBack Then
          ReadFile()
       End If
    End Sub
     
    Private Sub ReadFile()
       Dim reader1 As New StreamReader(Server.MapPath(Request.QueryString("DocID")))
       Dim text1 As String = reader1.ReadToEnd
       reader1.Close
       FreeTextBox1.Text = text1
    End Sub

    </script>

    <asp:Content ID="PhotoTarget" ContentPlaceHolderID="PageBody" runat="Server">

        <div class="style7">
     <FTB:FreeTextBox id="FreeTextBox1" runat="Server"
        ReadOnly="true" EnableHtmlMode="false" Focus="true" Width="850"
        AutoHideToolbar="true" ToolbarLayout="" EnableToolbars="false" />
        </div>
    </asp:Content>

    OK so far, expect it does not display the image. I have tried a large number of suggestions from various posts (putting BASE in the head section of the HTML page, replace src with fully qualfied pathname, adding 

    FreeTextBox1.ImageGalleryPath = "dir1/dir2"

    into the ReadFile function, putting the images in ~/images - absolutely nothing seems to work.

    I am sure this must be simple, but all the other posts seem to be talking about ImageGallery, and don't apply to this particular issue. Any assistance VERY gratefully received, as I am very please so far with FTB, but cannot go live with my site until this one issue is resolved!!

    Many thanks in advance,

    Cheers

    Ross Holland


View as RSS news feed in XML
www.freetextbox.com