Really basic Problem with PropertySearch

Vote:
 
It doesn't seem to return anything! Help! I've been trying to use PropertySearch to be able to select pages of specific categories in a subdirectory, but I keep getting no results, and the code runs fine without erroring, it seems. I've stripped out more and more criteria/complexity in an attempt to bottom this out, and finally it's pared down to this: <%# configuration.startpage%> runat="server" ID="PropSearch" >    This returns no results. (I've also changed PropertyName="PageLink" to ="PageName" in the Property line in testing this) Okay, it's starting at the root to search, and there is at least one page there. My questions are: 1) Anyone got any suggestions to get this working? 2) If it were working, should I be expecting all the pages in the root, or all the pages in the root and subdirectories? Note: I've been through the SDK and several code examples, and they all seem to match what I've tried to use here. Thanks in advance
#12527
Mar 25, 2008 18:35
Vote:
 
Do you DataBind() your webcontrols ? I guess you also want a PropertyCriteria to find what you are searching for ? See the SDK for more help. The good thing with the PropertSearch is that the search will ask the database for pages, not recursive traverse through the website structure. This will increase the performance. As the SDK say, keep the criterias few due to performance. You will get pages from Configuration.StartPage and all subdirectories. /Øyvind
#14448
Mar 25, 2008 18:44
Vote:
 
Hi, thanks for the response. I didn't have this DisplayOnFirstPage property set, and haveadded it now (=True). I've also checked if a databind was happening, and it does indeed bind with no error/exception raised (I ran the debug up to and through the databind, and the DataCount remains at 0 before and after)...it just still returns 0 records. Any other suggestions? thanks
#14449
Mar 25, 2008 18:44
Vote:
 
This should work. As Øyvind said, make sure you do a DataBind() in you code-behind. Frank :)
#14450
Mar 25, 2008 18:44
Vote:
 
all - thanks for the suggestions, and I did get it to work, but adding one more propertycriteria (based on PageCategory). After that, it returned the right information, but when I took the additional PropertyCritieria out, it wnet back to returning 0 values. Weird! thanks again!
#14451
Mar 25, 2008 18:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.