Did you add the third property afterwards? If so, it may not yet be in your published xml for each of the "Product" documents, hence failing on the .GetProperty("keys") which will return null, so .Value will raise the exception.
Republish your site to make sure all "Product" docs have this property published as well.
If that doesn't work, fire up your debugger and see why it's failing by adding a try/catch and inspecting the exception thrown.
Problem finding property by name .NET
I have a ajax autocomplete textbox on my umbracopage which has been working fine comparing prefixtext agains two properties from my documenttype.
However, yesterday I added a third property to compare against and this is where the problem comes in.
Following code works fine
However if I add my newly created property(keys) as a third condition the whole ajax autocomplete fails in showing anything at all.
Like this.
the property keys is a textstring just like name and articleNr
Did you add the third property afterwards? If so, it may not yet be in your published xml for each of the "Product" documents, hence failing on the .GetProperty("keys") which will return null, so .Value will raise the exception.
Republish your site to make sure all "Product" docs have this property published as well.
If that doesn't work, fire up your debugger and see why it's failing by adding a try/catch and inspecting the exception thrown.
Cheers,
/Dirk
Yes, it was added afterwards.
I have over 100 products....do I have to republish each of these one by one? Or is there another way of doing it?
yup, go to /umbraco/dialogs/republish.aspx?xml=true and hit Refresh to regenerate the published xml.
Cheers,
/Dirk
Great work Dirk, it works perfectly now!
is working on a reply...