Formatting image selector result textbox

Last post 04-14-2010, 7:38 AM by spencet. 2 replies.
Sort Posts: Previous Next
  •  04-13-2010, 1:03 PM 60065

    Formatting image selector result textbox

    I built an image selector tool using the Image Gallery selector. After I select my image, and it places the path result into my textbox, the path reflected is the absolute path from my local machine:
     
     
     
    When I click Update Image, I'm writing that Image textbox result to my database and I don't want the Absolute Path recorded. I want the Site Root Relative path recorded. How can I change it so that after I select my image, it inserts the Site Root Relative Path into my textbox instead: "~/uploads/user-images/image.jpg"?
  •  04-13-2010, 4:20 PM 60070 in reply to 60065

    Re: Formatting image selector result textbox

    Dear spencet,
     
    Please use the following code and test it again:
     
    <CE:Editor id="Editor1" runat="server" Width="400" Height="300" AutoConfigure="None" ShowHtmlMode="false" ShowPreviewMode="false" EnableContextMenu="false" ShowGroupMenuImage="False" ShowBottomBar="false" BackColor="White" BorderColor="White"  URLType="SiteRelative"></CE:Editor>
     
    Regards,
    Eric
  •  04-14-2010, 7:38 AM 60086 in reply to 60070

    Re: Formatting image selector result textbox

    Hey Eric, thanks for the reply. I was already using URLType="SiteRelative":
     
    <CE:Editor ID="Editor1" runat="server" Width="1" Height="1" AutoConfigure="None"  
          ShowHtmlMode="False" ShowPreviewMode="False" EnableContextMenu="false" ShowGroupMenuImage="False"  
          ShowBottomBar="False" BackColor="White" BorderColor="White" URLType="SiteRelative">                                       
    </CE:Editor>
     
    I've also tried:
     
     
    <CE:Editor ID="Editor1" runat="server" Width="1" Height="1" AutoConfigure="None"  
          ShowHtmlMode="False" ShowPreviewMode="False" EnableContextMenu="false" ShowGroupMenuImage="False"  
          ShowBottomBar="False" BackColor="White" BorderColor="White" URLType="SiteRelative"
           UseRelativeLinks="true" RemoveServerNamesFromUrl="true">                                       
    </CE:Editor>
     
    I'm thinking I might have to strip out what I don't want saved manually, via some .NET string manipulation trickery. I was just hoping there was something simple I could do with CE instead.
     
View as RSS news feed in XML