Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesGetPropertyInfo Obsolete in DNN 5?GetPropertyInfo Obsolete in DNN 5?
Previous
 
Next
New Post
12/5/2010 7:22 AM
 
Michael Gerholdt wrote:
Thanks, Bill.

The "obsolete" code exists out of the box in the DNN 5.5.1 starter kit code for compiled module, in both VB and C#.

 Michael, please log the issue into the tracker at support.dotnetnuke.com, in order to get it fixed. Thank you.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/12/2010 8:20 PM
 

It is obsolete in 5.6.0 as well. Here's a c# version

//warning CS0618: 'DotNetNuke.Common.Utilities.CBO.GetPropertyInfo(System.Type)' is obsolete:
//Obsolete in DotNetNuke 5.0. Replaced by GetProperties(Of TObject)() '
//ArrayList objProperties = CBO.GetPropertyInfo(typeof(TesterInfo));
Dictionary<string, PropertyInfo> objProperties = CBO.GetProperties<TesterInfo>();

Note: The comment should read Replaced by CBO.GetProperties and/or provide an example as above


Dwayne J. Baldwin
 
New Post
9/14/2011 8:37 AM
 
// THE OLD
//ArrayList objProperties = CBO.GetPropertyInfo(typeof(StatusInfo));
//foreach (PropertyInfo objPropertyInfo in objProperties)
//{
// strContent = strContent.Replace("[" + objPropertyInfo.Name.ToUpper() + "]", Server.HtmlDecode(DataBinder.Eval(e.Item.DataItem, objPropertyInfo.Name).ToString()));
//} 

//THE NEW
Dictionary<string, PropertyInfo> objProperties = CBO.GetProperties<StatusInfo>();
foreach (KeyValuePair<string, PropertyInfo> entry in objProperties)
{
strContent = strContent.Replace("[" + entry.Value.Name.ToUpper() + "]", Server.HtmlDecode(DataBinder.Eval(e.Item.DataItem, entry.Value.Name).ToString()));
}

I can't believe that nowhere on the internet, someone is giving a 1:1 replacement for this.
Please see above code: How it was used before (THE OLD), and how it should be used now (THE NEW)
The part in red, is the only part you should change to your own value.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesGetPropertyInfo Obsolete in DNN 5?GetPropertyInfo Obsolete in DNN 5?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out