Hi again,
I have developed user control that I can put on a page and it works no problem.
However, when I pull data out of a dataset into a datagrid and put user control within a template column, the control displays, but doesn't work; as in it cannot keep its state when it is supposed to do something.
This is my templateColumn...
- Code: Select all
<asp:TemplateColumn headertext="Title">
<ItemTemplate>
<foxford:dbImg runat="server" imageid='<%# Container.DataItem("imgId") %>' alternatetext='<%# Container.DataItem("title") %>' /><br />
<asp:hyperlink runat="server"
text='<%# Container.DataItem("title") %>'
href='<%# Container.DataItem("url") %>'
target="_blank" />
</ItemTemplate>
</asp:TemplateColumn>
As you can see, the control in question is my <foxford:dbImg> control which should do something whenever a button is pressed within it.
For your information, my control displays an image from a database with an "Edit" button. When the button is clicked it then should display a file upload field.
Any ideas?
Thanks, Steve