Groups | Blog | Home
all groups > asp.net building controls > december 2005 >

asp.net building controls : FormView Control


Bob Peek
12/28/2005 10:22:03 AM
I would like to insert some number of Form View Controls onto a single web
page in the code behind file. The number to be determined at run time. Is
this possible?

If so, Can I create a user control that incorporates a formview control, a
sqldatasource control and other controls and then insert some number of those
controls into a single web page.

Ultimately, I will need to change a parameter in the sqldatasource select
Teemu Keiski
1/3/2006 3:30:10 PM
Hi,

I'd think you could utilize Repeater for that as it can repeat anything.
Just give the "virtual" data source to it (for example a dummy array having
the runtime-determined number of items) and databind it. In the ItemTemplate
you'd have what you'd want to repeat that n times. And yes, it could be a
user control just as well, in the ItemTemplate of a Repeater.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke



[quoted text, click to view]

AddThis Social Bookmark Button