I want to display an array of pictures and I don't know beforehand how many
there are in the array. I want there to be up to four pictures in a row
(all the same size, of course), aligned to the left. When the fifth picture
appears, it would start the next row.
Someone suggested the datagrid control, but I don't see how to use that one
here. I am asking how to code the visual aspect of the page so that it will
handle the variable number in the manner I want. As far as specifying the
source of the pictures, I can do that in the Page_Load.
I know this is aspx and vb, but the way I did it in php was to created a
string (in php) containing all the html when I was loading the page, and in
the appropriate place in the html <body> I merely echoed (wrote) that
string. How do I do it here?
--
Shelly
Mark Rae [MVP] - 11 Sep 2007 19:40 GMT
> How do I do it here?
The asp:Repeater webcontrol is perfectly suited to this - just specify the
number of columns as 4:
http://www.google.co.uk/search?sourceid=navclient&aq=t&hl=en-GB&ie=UTF-8&rlz=1T4
GGIH_en-GBGB220GB220&q=asp+repeater+columns

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
Shelly - 11 Sep 2007 19:55 GMT
>> How do I do it here?
>
> The asp:Repeater webcontrol is perfectly suited to this - just specify the
> number of columns as 4:
> http://www.google.co.uk/search?sourceid=navclient&aq=t&hl=en-GB&ie=UTF-8&rlz=1T4
GGIH_en-GBGB220GB220&q=asp+repeater+columns
I didn't find column in the properties list.
Mark Rae [MVP] - 11 Sep 2007 20:43 GMT
> I didn't find column in the properties list.
In fact, a DataList would be even simpler than a Repeater - just set the
RepeatDirection and RepeatColumns properties, and you're good to go...
http://samples.gotdotnet.com/quickstart/aspplus/samples/webforms/ctrlref/webctrl
/datalist/doc_datalist.aspx

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net