Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pngocnt 6 posts 26 karma points
    Nov 17, 2010 @ 04:54
    pngocnt
    0

    Can't show image in Webusercontrol?

    Hi all,

    Im a new member to Umbraco, I just saw the video "Using .NET User Controls" a few minutes ago, and created a new Webusercontrol according the video,

    the Test.ascx control contains some images with src tag looks like "src='/images/test.jpg'"

    I created new content with the new template which is integrated to Test.ascx control, but the test.jpg was not shown in the new content page (http://localhost:86/aod_content),

    Pls help me to undertand this issue, and let me know how to show image in web user control

     

    Thanks all guys!

     

  • Rich Green 2246 posts 4008 karma points
    Nov 17, 2010 @ 07:47
    Rich Green
    0

    Hi Phan,

    Can you post the relevant html source of http://localhost:86/aod_content ?

    Rich

  • pngocnt 6 posts 26 karma points
    Nov 17, 2010 @ 08:40
    pngocnt
    0

    pls see the bellow steps:

    1. Create "AOD_Template" Template, here is the source code:

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
     <umbraco:Macro Alias="New_Macro" runat="server">umbraco:Macro>
    asp:Content>

    2. Create "AOD_DocumentType" in the Document Type, here is the setting in tab:

    • Info tab:
      Allowed templates: Clear all check box, then check "AOD_Template".
    • Structure tab: 
      Allowed child nodetypes: Only check "AOD_DocumentType"

    3. Click to Content, Right click on Content => Create, put the "aod_content", then choose

    4. Publish

    5. Go to the link http://localhost:86/aod_content.

     

    Pls let me know all of steps above are correct or not, and why the image in web usercontrol does not shown?

    Thanks so much!

Please Sign in or register to post replies

Write your reply to:

Draft