mmm...wonder what else i am missing... -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Bill McCarthy Sent: Saturday, 16 October 2010 11:09 AM To: 'ozDotNet' Subject: RE: Assigning property at runtime from database?
Ooops, sorry, it was VB6. So that makes it only 12 years :) |-----Original Message----- |From: Bill McCarthy [mailto:[email protected]] |Sent: Saturday, 16 October 2010 11:04 AM |To: 'ozDotNet' |Subject: RE: Assigning property at runtime from database? | |Uhm, VB5 I think (may have been in 4, can't honestly remember). So anyway |about 15 years give or take a couple ;) | | | ||-----Original Message----- ||From: [email protected] [mailto:ozdotnet- ||[email protected]] On Behalf Of Anthony ||Sent: Saturday, 16 October 2010 10:46 AM ||To: 'ozDotNet' ||Subject: RE: Assigning property at runtime from database? || ||Great..first time i have seen callbyname, exactly what i needed! When was ||callbyname introduced? || ||-----Original Message----- ||From: [email protected] [mailto:ozdotnet- ||[email protected]] ||On Behalf Of Bill McCarthy ||Sent: Saturday, 16 October 2010 10:12 AM ||To: 'ozDotNet' ||Subject: RE: Assigning property at runtime from database? || ||Hi Anthony, || ||What you are after is late binding. There's numerous ways of doing this, ||such as reflection. But I would probably opt for using CallByName function ||in VB. || || |||-----Original Message----- |||From: [email protected] [mailto:ozdotnet- |||[email protected]] On Behalf Of Anthony |||Sent: Saturday, 16 October 2010 12:08 AM |||To: 'ozDotNet' |||Subject: Assigning property at runtime from database? ||| |||I have a few usercontrols in an asp.net project that have properties set at |||runtime from a database. ||| |||Table : ControlProperty ||| ||| PropertyName Value ||| ||| Name RedControl ||| ||| Color Red ||| ||| ||| My asp code ||| ||| ....... ||| ||| ucHTML = CType(LoadControl("~\Controls\ucHTML.ascx"), |||ucHTML) ||| ||| for each oProperty in oProperties ||| ||| ucHTML.[oProperty. PropertyName ]=[Value] 'What do i do |||here? ||| ||| ucHTML.Name=Value 'Can't do this as i dont know the property |||until runtime! ||| ||| Next ||| ||| ||| ||| I'm sure there is an easy answer to this? ||| |||Is your website being IntelliXperienced? |||<http://www.intellixperience.com/signup.aspx> | www.yougoingmyway.com ||? |||regards |||Anthony (*12QWERNB*) ||| |||Is your website being IntelliXperienced? ||| ||| ||
