hi dear ....
u are just adding the html controls in a div.  not binding the event on the
linkbutton... just try to bind the link button with event. so that it can
render the page.

i tell u the easy way just try to find the control on fly in Google. it will
help u

With Warm Regards
===============
Atul Setu
+91-98112-20302
Software Engineer (DOT .Net)

atuls...@gmail.com


On Thu, Jan 27, 2011 at 4:40 PM, Rifky Rafeethu <rafee...@gmail.com> wrote:

> Dear All,
>
> i'm triying to create a table in the code behind file by reading the
> database using datareader. and add the string to Div Tags InnerHTM part to
> show it in the ASPX page. the table details are appearing properly. my
> problem is, in the first column i'm adding a linkButton to make the user
> click to call a method in the code behind file.
>
> but the link button is not appearing in all the rows.
>
> i have added the coding below.. the output also attached as a image..
>
> the first column is empty in all the cells..
>
> what am i missing here.. please help.
>
>
>
> Dim sb As New StringBuilder
>
> sb.Append("")
>
>             sb.Append("<table class='sGrid' width='510px'>")
>             sb.Append("<tr>")
>             sb.Append("<th scope='col' style='width: 40px;'>&nbsp;</th>")
>             sb.Append("<th scope='col' style='width: 70px;' align='left'>PO
> No.</th>")
>             sb.Append("<th scope='col' style='width: 25px;'
> align='left'>Ver</th>")
>             sb.Append("<th scope='col' style='width: 70px;'
> align='left'>Date</th>")
>             sb.Append("<th scope='col' style='width: 80px;'
> align='left'>Type</th>")
>             sb.Append("<th scope='col' style='width: 50px;'
> align='left'>Country</th>")
>             sb.Append("<th scope='col' style='width: 80px;'
> align='left'>Handling User</th>")
>             sb.Append("</tr>")
>
>             While dr.Read
>                 sb.Append("<tr>")
>                 sb.Append("<td><asp:LinkButton ID='lnk" &
> dr("PONo").ToString & "' runat='server' CommandName='" & dr("PONo").ToString
> & "' CommandArgument='" & dr("VersionNo").ToString & "'
> OnCommand='LoadPOSummaryTrigger' Text='Select'/></td>")
>                 sb.Append("<td>" & dr("PONo").ToString & "</td>")
>                 sb.Append("<td>" & dr("VersionNo").ToString & "</td>")
>                 sb.Append("<td>" & Format(CDate(dr("PODate")),
> "dd-MMM-yyyy") & "</td>")
>                 sb.Append("<td>" & dr("ProductType").ToString & "</td>")
>                 sb.Append("<td>" & dr("CountryOfOrigin").ToString &
> "</td>")
>                 sb.Append("<td>" & dr("UserName").ToString & "</td>")
>                 sb.Append("</tr>")
>             End While
>
>  sb.Append("</table>")
>
> divCordList.InnerHtml = sb.ToString
>
> Rgds
> Rifky
>
>

Reply via email to