Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem with databinding in a composite control

Reply
Thread Tools

Problem with databinding in a composite control

 
 
Charlie@CBFC
Guest
Posts: n/a
 
      10-08-2005
Hi:

I'm creating some composite custom server controls that combine user
interface element and a validation control. One such control combines a
dropdownlist and required field validator. The problem is when I want to
use it on a form, how do I get a reference to the dropdownlist contained
within the control to call databind method? Also, if I call databind within
server control, it works but viewstate doesn't work. Does any know of any
example of how to do this?

Thanks,
Charlie


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      10-09-2005
Hi,

you would need to expose the DDL out as a property (or then expose certain
strategic properties like DataSource out from the control, and override
DataBind method, and call straight that of your composite control when
databinding
)


--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke


"Charlie@CBFC" <> wrote in message
news:eyLqr$...
> Hi:
>
> I'm creating some composite custom server controls that combine user
> interface element and a validation control. One such control combines a
> dropdownlist and required field validator. The problem is when I want to
> use it on a form, how do I get a reference to the dropdownlist contained
> within the control to call databind method? Also, if I call databind
> within
> server control, it works but viewstate doesn't work. Does any know of any
> example of how to do this?
>
> Thanks,
> Charlie
>
>



 
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
Databinding on Composite Control Steve ASP .Net Building Controls 1 12-18-2005 12:44 PM
Databinding on Composite Control =?Utf-8?B?U3RldmU=?= ASP .Net 0 12-15-2005 07:45 AM
Losing Composite Control property that another Composite Control ... Chad ASP .Net Building Controls 0 02-01-2005 09:01 PM
Possible to create a composite control that has a child control that is a validator that validates the composite control itself? Jonathan Eric Miller ASP .Net Building Controls 2 07-22-2004 10:58 PM
Composite control with dynamic composite controls sleigh ASP .Net 1 02-12-2004 06:24 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