473,473 Members | 2,232 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Textbox value in the edittemplate of a datalist doesn't report the changes

Good Morning,
I've a problem with a textfiled inside a datalist, in particular it's value
it is not updated with the changes,
I mean sNomeCampo has still the value coming from the dB and not that
changed by the user,
May you help me ???

Antonio D'Ottavio
www.etantonio.it/en

Here's the code :
void Update_Command(Object sender, DataListCommandEventArgs e)
{
String sNomeCampo =
((TextBox)e.Item.FindControl("NomeCampo")).Text;
}

<ASP:DataList id="MyDataCampi" runat="server" HorizontalAlign="Center"
RepeatDirection="Horizontal" RepeatColumns="1"
OnEditCommand="Edit_Command" OnUpdateCommand="Update_Command"
OnDeleteCommand="Delete_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='<%# DataBinder.Eval(Container.DataItem,
"NomeCampo") %>'
runat="server"/>
</td>
</EditItemTemplate>

</ASP:DataList>
Nov 22 '05 #1
0 1021

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: etantonio | last post by:
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...
0
by: Gönen EREN | last post by:
I want to populate a datalist in edittemplate the probleme: i get an error while accesing the datagrid public void DataListEdit(Object src, DataListCommandEventArgs e ) { ...
0
by: Gaurav Gargate | last post by:
Hi Group, I am creating a ASP.NET (C#) project. I am creating a datalist with some dynamically generated text boxes in the edit template. I have the datalist control on the form. The text box...
2
by: donnet | last post by:
Inside my .aspx file, I have a textbox populated with data from a dataset like this: <asp:TextBox text='<%# DataBinder.Eval(Container.DataItem, "Comment")%>' id="CommentText" runat="server"...
4
by: bwalke | last post by:
I am developing a web form which is going to be used for manufacturing input. The form uses a DataList which list a batch of parts that may range anywhere from 1-9 parts. The DataList contains 6 ...
10
by: Nathan Sokalski | last post by:
I have a DataList control with an EditTemplate. Three of the controls in this template include a Calendar, a Button with CommandName="update", and a Button with CommandName="cancel". Whenever I...
2
by: Antonio D'Ottavio | last post by:
Good Morning, I've a problem with a textfiled inside a datalist, in particular it's value it is not updated with the changes, I mean sNomeCampo has still the value coming from the dB and not that...
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
0
by: Stanley Cheung | last post by:
Dear all, i put a datalist into a user control and then apply the itemtemplate & ediiTemplate inside, i use dgXXX.itemcommand to get the commandname from button the problem is the content of...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.