+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Search page content

Search page content

11 posts, 0 answered
  1. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    07 Nov 2010
    Link to this post
    Hi,

    I need a free text search for page content.
    My requirement is typing any text and clicking search, should display all pages containing this text in there content.


    Thanks
    Asit
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    07 Nov 2010
    Link to this post
    Hello asit ,

    You can use our built-in Page Index Provider.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    08 Nov 2010
    Link to this post
    Hi,

    Thanks for ur reply.

    But i need a custom search as i have also some other keyword search .

    The result will come based upon mix of these 2 free text and keyword search.

    i m already using the index search for search the whole website.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    08 Nov 2010
    Link to this post
    Hello asit,

    You can take a look at


    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    08 Nov 2010
    Link to this post
    Hi,
    i m getting all pages using
    IList allPages = cmsManager.GetPages();


    How can i get content of each page.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    08 Nov 2010
    Link to this post
    Hi asit,

    You have to make HttpRequst to the pages and then return the content as HttpResponse. You can use Telerik.Cms.Search.IndexInternalPageHandler or standard ASP.NET HttpResponse object.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    08 Nov 2010
    Link to this post
    Hi,
    Thanks for ur reply.

    But how can i achieve this, can u plz give me one sample?
  8. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    08 Nov 2010
    Link to this post
    Hi,

    i have gone through this URL.
    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/developing-with-sitefinity/how-to-get-the-html-content-of-the-page.aspx

    IndexInternalPageHandler pageHandler = new IndexInternalPageHandler(writer, this.url, this.pageId, this.culture);
     
    pageHandler.AppRelativeVirtualPath = context.Request.AppRelativeCurrentExecutionFilePath;
     
    server.Execute(pageHandler, writer, false);

    But i can't know how to get page content from this page handler.

    Thanks.
  9. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    09 Nov 2010
    Link to this post
    Hi,

    i m  using this process, but getting some wrong page content.

    WebRequest mywebReq;
                    WebResponse mywebResp;
                    StreamReader sr;
                    string strHTML;

                   mywebReq = WebRequest.Create("http://mypage.aspx");
                    mywebResp = mywebReq.GetResponse();
                    sr = new StreamReader(mywebResp.GetResponseStream());
                    strHTML = sr.ReadToEnd();
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    09 Nov 2010
    Link to this post
    Hi asit,

    1. Use HttpResponse
    2. Use StringWriter

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Charles
    Charles avatar
    61 posts
    Registered:
    18 Jul 2012
Register for webinar
11 posts, 0 answered