Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Repost: variable number of pictures to be shown

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shelly - 11 Sep 2007 19:32 GMT
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


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.