views:

37

answers:

2

I would like to show number of successful orders made by each customer. Number of orders will be represented by number of smiley faces. Upon clicking on the smiley face, it will link to other web page showing full order histories made by this customer. Basically all smiley faces will link to the same page. How this can be done in ASP.NET? What control should I use?

A: 

You can use the Repeater control for this task. Place LinkButtons or ImageButtons into the repeater controls ItemTemplate. Bind your orders with standard databinding to the repeater and create your links in the ItemDataBound event of the repeater.

Dirk
A: 

You can dynamically add controls in your code.

E.g. you can create a the link in your aspx in the location you want your images

 <a  ID="thelink" runat="server"></a>

And in your code you add sth like this (i.e. in Page_Load)

 for (int i = 0; i < N; ++i)
 {
     Image img = new Image();
     img.ImageUrl = "img.png";
     thelink.Controls.Add(img)
 }
cellik