.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

render datalist into divs rather than td tr

Posted By:      Posted Date: October 02, 2010    Points: 0   Category :ASP.Net

hello friends,

i am trying to render datalist into divs rather than td tr, if u have any tutorial or any refrence than post it here....

ur replies would be appriciable.

thanks and regards

Inderjeet Singh Sethi

View Complete Post

More Related Resource Links

how to reference datalist in pre render?



i have code in item databound, but i want to move it to prerender... how do i reference the controls correctly in prerender? in item databound i use e.item....?, what do i use in prerender?:

protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)

            Label Label55 = e.Item.FindControl("Label55") as Label;
            Label Label56 = e.Item.FindControl("Label56") as Label;

animate effect work but the render items are messed up.


Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.





datalist image slide show problem


hi friends

i am binding  images dynamically(back end)for a datalist .iam applying a slideshow for it .I am getting a problem to apply slideshow for dyanmically binded images.If the define in a div statically it working perfectly

for example pls go through my code below:

<script type="text/javascript">
$(document).ready(function() {
        fx: 'scrollLeft' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

<div class="slideshow">
        <img src="images/30_dummy.jpg" width="200" height="200" />
        <img src="images/aquarius.gif" width="200" height="200" />
        <img src="images/star.gif" width="200" height="200" />
        <img src="images/the-proud-indian-flag-1.jpg" width="200" height="200" />

I above code works perfectly and the slide show e

divs do not display side by side


I have two divs. I want them to display side by side, on the same row. Using display:inline-block I can do that. But as soon as I position some text in the bottom right corner of div1, the two divs do not have the same vertical position. They are side by side, but the 2nd div starts at the vertical position of the positioned text in the 1st div.   Why would it do that?  Both Chrome and IE8 render it the same way.

( I am doing the nesting of the divs on the left side so that I can position absolutely within a div and not the page. I can't get text to position in the lower right corner of a div any other way. )


  <div style="border:2px solid black;">
    <div style="display:inline-block;">
      <div style="width:10em; height:4em; background:orange;color:White;
        <span style="position:absolute;bottom:0px;right:0px;">
        login message

    <div s

Foundations: Render Text On A Path With WPF


With Windows Presentation Foundation (WPF) you can lay out text on a path, then animate the individual points defining the path and watch the characters bounce around in response.

Charles Petzold

MSDN Magazine December 2008

Smart Clients: Build A Windows Forms Control To Consume And Render WSRP Portlets


Smart client apps use local resources, provide a rich client experience, and support intelligent install mechanisms. Web services offer powerful interoperability and integration features. Find out how to combine them to develop integrated apps that incorporate data from disconnected sources.

Carl Nolan

MSDN Magazine February 2006

Datalist with embedded Grid or List...Sub Totals issue with iteration


Let me see if one of you can assist with this one...


i have a similar situation, but mine does not use the selected item (item Command). Here is what the form is to do:


1. this is for an educational environment, so we use SID- NOT SSN's, but i use the SID as a filter in the subset as the grouping unique id.

2. I'm trying to inject a sub total row at the last line item of each SID (if more than one item in the report for that SID).

3. I'm looping thru the items in the Datalist Item Command with a for each (item i in Datalist2.Items).

Filter in datalist


Hello all,

i have an question. I have two table's in my database.

One filled with persons, where de PK is a guid,

Second is a table with records of those persons and a date field with it's own PK "ID".

Now i want to fill  a datalist with all the persons whom arent in the second table between a given date.


anyone tips on how to accomplish that, I am using linq2sql..


Thanks in advance..





accessing values from a database with datalist?


I have a datalist and I am filling it using a dataadapter, dataset. So in my .ascx page, I have

<asp:datalist runat="server" id="dlProducts" repeatcolumns="2" repeatdirection="horizontal">


<table border="0">

<tr><td><%# Eval("Item_Name") %></td></tr>

<tr><td>I have to add a picture here</td><td><%# Eval("First_Name") %></td></tr>




In the area where I have put a statement like "I have to add a picture here", I have write a big case statement.  Like:

Case: 6 // show a picture from file1

case: 7 // show a picture from file2

Case 8: //show a picture from file3


So How do I do this here?  Because I dont know how to access the datalist values from code behind.


Here is my code behind:

SQLString = "SELECT First_Name, Picture, item_name, item_id from table1 where item_id = " + request.querystring["iid"];

dataadapter daItems = new dataadapter(SQLString, "connection_name");

dataset dsItems = new dataset();



javascript function not working with datalist


I have a datalist and there is a check box within this datalist in a .ascx page.  But I have to have an image out side the datalist.  So here is the code and its not owrking.  When I click on the image, I dont see any alert box. 


<script Language="JavaScript" type="text/javascript">


function validate_checkbox()



// set var checkboxSelect to zero

var checkboxSelect = 0;

var sProducts = "";


var multiCheck = window.document.forms["frmCompare"].CompareCheck.length;


if (multiCheck != null)


    // Loop from zero to the one minus the number of checkbox button selections

    for (counter = 0; counter < window.document.forms["frmCompare"].CompareCheck.length; counter++)


        if (window.document.forms["frmCompare"].CompareCheck[counter].checked)


            var seperator = (checkboxSelect > 0)?",":"";

            sProducts += sep

gap between inline-block divs


I have two divs, inline-block, width:50%.  When the width is 50% the two divs do not fit on the same line and the browser renders them one under the other.  Change the width to 49% and give them a background color. The divs render side by side, but with a small gap between them. I assume that gap is the reason the 50% width divs don't fit side by side. 

I am trying different combinations of margin:0; padding:0; line-height:0; border:0px;.

How can I make is so there is no gap, horizontal and vertical, between inline-block divs?


		<style type="text/css"> 




<body style="margin:0px; padding:0px;">

<div class="SideBySide" style="background-color:Green;">
<div class="SideBySide" style="background-color:Red;">


from datalist to gridview


hi guys


I have a problem, I wanna Insert that cridentials with gridview but I can't , I could that with datalist , so how can I do this with grid view

if there is a sample code i be happy

thanks to everybody..





Sub InsertAllBasketItems()

Dim productAPI As New basketTableAdapters.OrdersTableAdapter

For Each Item As DataListItem In DataList1.Items

datalist printOut() function Problem

  • i m using below code..by using it i able to write asp data into word file n format it.but i m facing problen in print out..

    it show exception

    Message = "The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))"

    please hav a look at below code....

  •  .................div data...................   
  •   <div id="printdiv" runat="server">   
  •     <table style="border: 5px solid #FF00FF; width:100%">   
  •     <tr>   

  • Custom Datalist rows

    Hi,I am use data list to display the three record and after showing the three record in one row then i want add the one row and then again the three row likedata..|data..|data..Single row...........Data..|Data..|data..Single row............so plz help me outThanks in advance

    Render X textboxes + Validation?

    Hey there, How can I render X amount of textboxes and still have all of them to require a value at validation? I dont know the variable X.. so it could be 1, it could 50.

    Page Header, PrintOnFirstPage=False, HTML render fine, PDF export leaves extra space

    As it says in the header.Setup:SSRS 2008, VS 2008 SP1Local Mode, rdlc fileDesign:Make a 1/2" Page header with a text box in it. Set PrintOnFirstPage=FalseBody contains a Table that spans multiple "hard" pages.Results:Renders to HTML in the report viewer just fine.PDF export leaves blank 1/2" at the top of page 1. With no header for page 1, I had hoped it would remove the extra space the same as in the report viewer.Question:Any way to tell SSRS not to leave space when page header is turned off for the first page?Attempts:Tried putting everything in a rectange in the header and set the visibility to false. Still leaves space.
    ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
    Sql Server  SharePoint  Silverlight  Others  All   

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend