Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > DataList and TextBox

Reply
Thread Tools

DataList and TextBox

 
 
Thomas
Guest
Posts: n/a
 
      11-09-2003
When creating a WebForm how can I get the OnTextChanged
event to fire for a TextBox in a DataList on an asp page?
Here is the DataList I am using:

<aspataList id="DataList1" runat="server">
<ItemTemplate>
<asp:TextBox id="tb1" runat="server"

OnTextChanged="DataListTextBoxChanged">
</asp:TextBox>
</ItemTemplate>
</aspataList>

If I have the TextBox outside the DataList the event fires
perfectly.


 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      11-10-2003
Thomas wrote:
> When creating a WebForm how can I get the OnTextChanged
> event to fire for a TextBox in a DataList on an asp page?
> Here is the DataList I am using:
>
> <aspataList id="DataList1" runat="server">
> <ItemTemplate>
> <asp:TextBox id="tb1" runat="server"
>
> OnTextChanged="DataListTextBoxChanged">
> </asp:TextBox>
> </ItemTemplate>
> </aspataList>
>
> If I have the TextBox outside the DataList the event fires
> perfectly.


The event should fire normally.
The reason could be that the textbox is not recreated at postback.
Is ViewState on for the page?
Is the state of the datalist changed on postback (EditItemIndex,
SelectedIndex, ...)?

--

Jos


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataList: Collecting IDs and TextBox values at same time Lorna70 ASP .Net 0 08-25-2009 09:06 AM
User Controls-MasterPages and finding TextBox in DataList EditItemTemplate Hillbilly ASP .Net 2 09-02-2008 03:35 PM
Issue getting data back from textbox in Datalist and container Person in Need ASP .Net Web Controls 0 09-05-2007 07:06 PM
Looping through DataList and reading TextBox values on Button Click bwalke@lbrspec.com ASP .Net 4 06-20-2005 06:27 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57