Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Using J Query in DataList

Using J Query in DataList

Scheduled Pinned Locked Moved C#
helpjavascripthtmldatabasesysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrkeivan
    wrote on last edited by
    #1

    Hey guys, I'm new to Jquery and I'm trying to use <pre>jCapSlide</pre> in a datalist,

    <pre lang="HTML">
    <asp:DataList ID="DataListList" runat="server" DataSourceID="ObjectDataSourceList"
    RepeatColumns="5" CellPadding="5" CellSpacing="5"
    OnItemDataBound="DataListList_ItemDataBound">
    <ItemTemplate>
    <div id="capslide_img_cont" class="ic_container">
    <asp:Image ImageUrl='<%#Eval("Images.Image.Virtual_FileName") %>' ID="MainImage"
    CssClass="NewsImage1" runat="server" />
    <div class="overlay" style="display: none;">
    </div>
    <div class="ic_caption">
    <p class="ic_category">
    '<%# Eval("Category.cName")%>'</p>
    <h3>
    '<%# Eval("pTitle") %>'</h3>
    <p class="ic_text">
    '<%# Eval("pTitle") %>'
    </p>
    </div>
    </div>
    </ItemTemplate>
    </asp:DataList>
    </pre>

    with this Function

    <pre lang="Javascript">
    <script type="text/javascript">
    $(function () {
    $("#capslide_img_cont").capslide({
    caption_color: 'white',
    caption_bgcolor: 'black',
    overlay_bgcolor: 'black',
    border: '',
    showcaption: false
    });
    });
    </script>
    </pre>

    There are 3 records, this applies on the first one but not the other two,
    I think the problem is repeated <pre>id="capslide_img_cont"</pre> but can't seem to fix it.
    can you help me out ?
    It's deeply appreciated

    L V 2 Replies Last reply
    0
    • M mrkeivan

      Hey guys, I'm new to Jquery and I'm trying to use <pre>jCapSlide</pre> in a datalist,

      <pre lang="HTML">
      <asp:DataList ID="DataListList" runat="server" DataSourceID="ObjectDataSourceList"
      RepeatColumns="5" CellPadding="5" CellSpacing="5"
      OnItemDataBound="DataListList_ItemDataBound">
      <ItemTemplate>
      <div id="capslide_img_cont" class="ic_container">
      <asp:Image ImageUrl='<%#Eval("Images.Image.Virtual_FileName") %>' ID="MainImage"
      CssClass="NewsImage1" runat="server" />
      <div class="overlay" style="display: none;">
      </div>
      <div class="ic_caption">
      <p class="ic_category">
      '<%# Eval("Category.cName")%>'</p>
      <h3>
      '<%# Eval("pTitle") %>'</h3>
      <p class="ic_text">
      '<%# Eval("pTitle") %>'
      </p>
      </div>
      </div>
      </ItemTemplate>
      </asp:DataList>
      </pre>

      with this Function

      <pre lang="Javascript">
      <script type="text/javascript">
      $(function () {
      $("#capslide_img_cont").capslide({
      caption_color: 'white',
      caption_bgcolor: 'black',
      overlay_bgcolor: 'black',
      border: '',
      showcaption: false
      });
      });
      </script>
      </pre>

      There are 3 records, this applies on the first one but not the other two,
      I think the problem is repeated <pre>id="capslide_img_cont"</pre> but can't seem to fix it.
      can you help me out ?
      It's deeply appreciated

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I think this probably belongs in the Javascript forum.

      One of these days I'm going to think of a really clever signature.

      1 Reply Last reply
      0
      • M mrkeivan

        Hey guys, I'm new to Jquery and I'm trying to use <pre>jCapSlide</pre> in a datalist,

        <pre lang="HTML">
        <asp:DataList ID="DataListList" runat="server" DataSourceID="ObjectDataSourceList"
        RepeatColumns="5" CellPadding="5" CellSpacing="5"
        OnItemDataBound="DataListList_ItemDataBound">
        <ItemTemplate>
        <div id="capslide_img_cont" class="ic_container">
        <asp:Image ImageUrl='<%#Eval("Images.Image.Virtual_FileName") %>' ID="MainImage"
        CssClass="NewsImage1" runat="server" />
        <div class="overlay" style="display: none;">
        </div>
        <div class="ic_caption">
        <p class="ic_category">
        '<%# Eval("Category.cName")%>'</p>
        <h3>
        '<%# Eval("pTitle") %>'</h3>
        <p class="ic_text">
        '<%# Eval("pTitle") %>'
        </p>
        </div>
        </div>
        </ItemTemplate>
        </asp:DataList>
        </pre>

        with this Function

        <pre lang="Javascript">
        <script type="text/javascript">
        $(function () {
        $("#capslide_img_cont").capslide({
        caption_color: 'white',
        caption_bgcolor: 'black',
        overlay_bgcolor: 'black',
        border: '',
        showcaption: false
        });
        });
        </script>
        </pre>

        There are 3 records, this applies on the first one but not the other two,
        I think the problem is repeated <pre>id="capslide_img_cont"</pre> but can't seem to fix it.
        can you help me out ?
        It's deeply appreciated

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #3

        There are basically two ways to create a webpage with code behind. 1. Create dynamic data inside the HTML (what you do here) 2. Spit out complete HTML from the code behind Personally I always use option 2 as much as I can. What you would need to do then is create a datalist and add a label to it. In that label you can set any HTML coding you want. (There are also many more advanced ways to do it) Hope this helps.

        V.
        (MQOTD Rules )

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups