Hi,
Thanks for the reply,
the problem that I have is that my user control is the entity, I don't know
how many I have to render until the page is processed (sorry, is my first
project in aspnet)
So, if I have it on the aspx page I will have (generic code)
<table>
<row>
<cell>
<MyHeader:MyUse rControl Id = "MyName" runat ="server"/>
</cell>
</row>
</table>
This works great for a single instance but I want several, the result on
html has to be something like this:
<cell>
<MyHeader:MyUse rControl Id = "MyName" runat ="server"/>
<MyHeader:MyUse rControl Id = "MyNamex" runat ="server"/>
<MyHeader:MyUse rControl Id = "MyNamexx" runat ="server"/>
<MyHeader:MyUse rControl Id = "MyNamexxx" runat ="server"/>
</cell>
The amount of them is dynamic, that's why I am creating several instances of
the user control on the server code. To do an analogy, is like creating a
data repeater where the individual content is a usercontrol.
Hope this makes sense :)
Salva
--
Salvador Alvarez Patuel
Exony Ltd - London, UK
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
"Salvador" <Sa******@discu ssions.microsof t.com> wrote in message
news:3A******** *************** ***********@mic rosoft.com... Hi,
This question is related with c# and ASP.NET, (I could't find the rigth
forum).
microsoft.publi c.dotnet.framew ork.aspnet will do
What I need to do is to add a usercontrol in a row of my table using the
server code (I know how to do it on the front-end). The idea is to show
the
search results on the page, every entry is a usercontrol (obviously the
same
loaded with different data). I have tried this but it does not work, any
ideas? (here is an example)
You can't do it like that, first of all what is wrong with doing it in the
aspx page? ( I assume you refer to this when you talk about the front-end) ?
I always do it like that, you have all the grid declaration in the aspx
page
In case you dont want to do it for some reason the solution is intercept the
DataGrid.ItemDa taBound event. it does fire when the grid is binding the
datasource.
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation