E
etantonio
Good Morning,
I still havent solved my problem with a textbox inside an
editItemTemplate
of a datalist,
in fact now it is filled with the word "CIAOOOOOO" , if a runtime in
the
form I put a different word
like "PIZZAAAA" this new word is not available in the Update_Command
following :
void Update_Command(Object sender, DataListCommandEventArgs e)
{
String sNomeCampo =
((TextBox)e.Item.FindControl("NomeCampo")).Text;
}
where instead I've again sNomeCampo = "PIZZA" .
I need help, this problem is stopping my job, many thanks
Antonio D'Ottavio
www.etantonio.it/en
Here's the code inside HTML:
<ASP
ataList id="MyDataCampi" runat="server"
HorizontalAlign="Center"
RepeatDirection="Horizontal" RepeatColumns="1"
OnEditCommand="Edit_Command"
OnUpdateCommand="Update_Command"
OnCancelCommand="Cancel_Command" OnItemDataBound="BindComboes"
<ItemTemplate>
<tr style="background-color:CCFF99">
<td width=10% align="center">
<asp:LinkButton id="EditButton" Text="Edit"
CommandName="Edit" runat="server"/>
<input id="HiddenIDCampo" type="hidden"
value='<%#DataBinder.Eval(Container.DataItem, "IDCampo") %>'
runat="server"
/>
</td>
<td>
<%#
DataBinder.Eval(Container.DataItem,"NomeCampo")%>
</td>
</tr>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton id="UpdateButton" Text="Update"
CommandName="Update" runat="server"/>
<td>
<asp:TextBox id="NomeCampo" text='CIAOOOOOOOOOO'
runat="server"/>
</td>
</EditItemTemplate>
</ASP
ataList>
I still havent solved my problem with a textbox inside an
editItemTemplate
of a datalist,
in fact now it is filled with the word "CIAOOOOOO" , if a runtime in
the
form I put a different word
like "PIZZAAAA" this new word is not available in the Update_Command
following :
void Update_Command(Object sender, DataListCommandEventArgs e)
{
String sNomeCampo =
((TextBox)e.Item.FindControl("NomeCampo")).Text;
}
where instead I've again sNomeCampo = "PIZZA" .
I need help, this problem is stopping my job, many thanks
Antonio D'Ottavio
www.etantonio.it/en
Here's the code inside HTML:
<ASP
HorizontalAlign="Center"
RepeatDirection="Horizontal" RepeatColumns="1"
OnEditCommand="Edit_Command"
OnUpdateCommand="Update_Command"
OnCancelCommand="Cancel_Command" OnItemDataBound="BindComboes"
<ItemTemplate>
<tr style="background-color:CCFF99">
<td width=10% align="center">
<asp:LinkButton id="EditButton" Text="Edit"
CommandName="Edit" runat="server"/>
<input id="HiddenIDCampo" type="hidden"
value='<%#DataBinder.Eval(Container.DataItem, "IDCampo") %>'
runat="server"
/>
</td>
<td>
<%#
DataBinder.Eval(Container.DataItem,"NomeCampo")%>
</td>
</tr>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton id="UpdateButton" Text="Update"
CommandName="Update" runat="server"/>
<td>
<asp:TextBox id="NomeCampo" text='CIAOOOOOOOOOO'
runat="server"/>
</td>
</EditItemTemplate>
</ASP