Advertise Zone
ขายเสื้อผ้าแฟชั่นเกาหลี ญี่ปุ่น ฮ่องกง




Check PageRank

Add to Technorati Favorites


Categories
Shopping online

ASP.NET : Add Autonumber into Repeater

Hi all,
Today, I would like to present the article about ASP.net [VB.net] programming.
I’m not professional with this language but I try to be …
I’m practicing so, if I found some problem and I think it will useful for anyone. I will post in here.

Note: This is not ASP.net tutorial website. just want a post some interesting topic.

Problem1 Add Autonumber into Repeater in asp.net

When you do with Repeater, you’ll found that all item comes from database/sql command. but this is how-to add autonumber into Repeater.

< ItemTemplate>
    < %# Container.ItemIndex + 1 %>
< /ItemTemplate>

** ItemIndex is a propertry of Repeater. It occured from created or bounded each row.

Here is a code for bounding data into Repeater:

objAdapter = New OleDbDataAdapter(strsql, objCon)
ds =
New
DataSet
objAdapter.Fill(ds,
“tmpTable”
)
rpt_details.DataSource = ds
rpt_details.DataMember =
“tmpTable”
rpt_details.DataBind()

** rpt_details = Repeater

 

 
Remark:
Thank you for this cool information from :
http://blogs.x2line.com/al/archive/2008/04/26/3408.aspx

86 Responses to “ASP.NET : Add Autonumber into Repeater”

1centemails.com

Leave a Reply