Click here to Skip to main content
15,895,667 members

Comments by Member 12194656 (Top 4 by date)

Member 12194656 11-Jul-16 12:54pm View    
Thanks for your reply. I find out from other website that I need to findcontrol of the placeholder before I find the textbox.

here is the code

ContentPlaceHolder cph = ContentPlaceHolder)this.Master.FindControl("MainContent");
Member 12194656 8-Jul-16 13:19pm View    
Hi, Yes I do, but I got 'multiple IDs' message now, please see below. Thanks again.
Member 12194656 8-Jul-16 13:18pm View    
Thanks for your reply.
I got an error message about multiple TextBox ID were found because I need to regenerate all the textboxes on every postback.

Multiple controls with the same ID 'ROW_0Col_0' were found. FindControl requires that controls have unique IDs.

Is there anyway to reset all the IDs? Please help, many thanks.
Member 12194656 20-May-16 13:53pm View    
Sorry, I forgot to mention that I use Webform and Gridview, thanks.
Basically, My question is how to convert the following.

<asp:TemplateField HeaderText="Status">
<itemtemplate>
<asp:Image ID="Image1" runat="server" ImageUrl="~/Image/gg.jpg" Height="10px"
Width="10px" />

<itemstyle horizontalalign="Center" width="15px">


to c# code if I cannot create this Gridview column in ASP.NET.

Thanks.