Could I request the broker server for a component sending the component's URI, using dd4t?
When I use ComponentFactory.TryGetComponent - it returns null for the object.
Using Tridion2011sp1 and DD4T 1.25
Thanks in advance.
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.
Sign up to join this communityIComponent ComponentFactory.GetComponent(string componentUri, string templateUri = "");
or
bool ComponentFactory.TryGetComponent(string componentUri, out IComponent component, string templateUri = "");
are the correct methods. If you are getting null, have you verified that the component presentation you're requesting is in the Broker DB, i.e. is published?