Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • dominik 711 posts 733 karma points
    Mar 08, 2011 @ 15:15
    dominik
    0

    Examine search bodytext

    Hello I just tried to get the first 50 digits from the bodytext after the nodename field in the examine search.

    But it does not work

    - I added the bodyText into ExamineIndex file
    - I recalculated the Indexes (they include now the bodyText)
    - I added the <%# ((Examine.SearchResult)Container.DataItem).Fields["bodyText"] %> into the ascx file of the search.

    But it throws an error

    Can anybody help?

  • kows 81 posts 151 karma points c-trib
    Mar 08, 2011 @ 16:06
    kows
    0

    "an error"...

    provide picture or details if you want any further help (basic structure would do a lot)

  • dominik 711 posts 733 karma points
    Mar 08, 2011 @ 16:27
    dominik
    0
    [KeyNotFoundException: The given key was not present in the dictionary.]
    System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12681071
    ASP.usercontrols_usersearchresults_ascx.__DataBind__control4(Object sender, EventArgs e) +476
    System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +304
    System.Web.UI.Control.DataBindChildren() +11257623
    System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +321
    System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +185
    System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +643
    System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +167
    UserSearchResults.usercontrols.UserSearchResults.Page_Load(Object sender, EventArgs e) +1159
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
    System.Web.UI.Control.LoadRecursive() +71
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Control.LoadRecursive() +190
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048
  • kows 81 posts 151 karma points c-trib
    Mar 08, 2011 @ 16:49
    kows
    0

    try working with the itemdatabound event of your container, and check what values searchresult has.

    ((SearchResult)e.Item.DataItem).Fields["bodyText"] works for me in codebehind (itemdatabound of listview).

Please Sign in or register to post replies

Write your reply to:

Draft