asp.netfull-text-searchanchorhtmlgenericcontrol

Need to search (and navigate to the searched word) within in an ASPX page


Scenario: ASP.NET site. In Instruct.ASPX code-behind, I generate the contents of the page and they are well formatted using TABLE, TR, TD, Hyperlink, Anchor tags etc. The entire content is assigned to InstructionsDiv as shown below.

HtmlGenericControl InstructionsDiv = new HtmlGenericControl("Div");

Since the contents of the page is growing, USERS want to be able to search within the page. I would like to provide a text button and when they click on SEARCH button, I would like to wrap the word they are looking for within an anchor tag and start search.

Is this the correct way? If so, what do I need to take care of when they click on SEARCH button? If the search has many results, I want them to continue. Pretty much I am looking for a browser Ctrl+F functionality.

Any other better thoughts or suggestions, please share.

Thanks,


Solution

  • Why not look at using something like a jquery plugin to search via javascript. Here is one I found after a quick search:

    jQuery Quicksearch