Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > User Control within DataList/GridView

Thread Tools

User Control within DataList/GridView

naomi naomi is offline
Junior Member
Join Date: Sep 2006
Posts: 1
Hi there,

I have following problem:

I created a user control (ascx) which I want to use within a datalist. I bind the the ascx properties as usual to the columns of the data source.

I want the user to edit the data in the datalist, however, in the updatecommand event of the list when I try to access the values of the user control using it properties, I don't see them, I just see the the default values according to the property type. For example if I have in the user control a text box that should have a number and I have a property of type integer to read/write the value, in the UpdateCommand the value of the property is 0 and not what the user input. I tried few other events and all of them have the same problem. Obviously when I use text box directly it works fine.

I wonder if you have any clue how to get around this one.


Reply With Quote

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
User Control to Control Other User Control Jonathan Wood ASP .Net 4 02-02-2010 03:41 PM
Passing Parameters to user control within another user control hmikki ASP .Net Web Controls 1 10-19-2007 02:00 AM
persisting changes to a control outside a user control from the user control? Mad Scientist Jr ASP .Net 0 03-22-2006 08:02 AM
Hosting a user control within a user control Charlie@CBFC ASP .Net 2 10-15-2005 08:55 PM
User Control within User Control - Event not firing Don ASP .Net 3 03-11-2005 05:56 PM