views:

114

answers:

2

How do i represent an image through CAML? I have a list and im trying to create a list instance by adding data through CAML

 <Data>
      <Rows>
        <Row>
          <Field Name="Title">Promotion 2</Field>
          <Field Name="Promotion Image">/SiteCollectionImages/PR.gif</Field>

        </Row>
      </Rows>
    </Data>
+2  A: 

Have you tried:

<Field Name="Promotion Image"><![CDATA[[<IMG SRC="/SiteCollectionImages/PR.gif"/>]]></Field>
Magnus Johansson
just tried it didnt work :(
raklos
Yea, I forgot the IMG element.
Magnus Johansson
+1  A: 

this did the trick:

<Field Name="Promotion Image"><![CDATA[<IMG SRC="/SiteCollectionImages/PR.gif"></IMG>]]></Field>

thanks Magnus

raklos
You should click the tick next to Magnus' answer. Gives him a bit of reputation and you may get a badge :D
Aidan