How To Show Keywords And A Search Box Under Site's Google Results
Jan 20, 2010
I saw on the google when search "code project", some keywords and a text field and a button to search that google has generated for "code project" keyword also for "manchester university" in the same way.
How is it possible to show key words and text field/button for our website on google? As it shows for "code project" and "manchester university" etc.
visit google and search "manchester university" u'll see:
StudentNet Job Opportunities
textfield/ and a button
I want this kind of result for my site from Google!!
Working in ASP.NET (VB), I am trying to develop a simple search results page for my website.
The process is as follows:
(1) The site's user enters a search phrase;
(2) The search results page searches the site's database, returns the page title as a link, and a short snippet from each search "hit", with the search phrase highlighted.
I already have the search part done, and also the "highlighted" part done (using Regex). However, I want to be able to return a short snippet of text, which include the search phrase (a few words before the search phrase, a few after). Something like:
I have an ASP.NET website set up, and I'm using Google Analytics for page tracking. The only thing I don't like is that I have to go away from my site (to the Google Analytics site) to see the report. Is there any way to show the Google Analytics data on my own site with all the AJAX that they have?
I want to create a seach textbox for users to enter a few keywords in ,..and then my sql query will display the results......( basically a little search engine for my website)Ok so im thinking of using the Containstable with ranking on how close these keywords are to eachother... so the closer the keywords are to each other... the higher their ranking will be.... but I also want to seach for these keywords in 4 columns in one Datatable how can I do this
I build a serach function just using SelectCommand and SelectParameters, i.e.
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:mprojectConnectionString %>" SelectCommand="SELECT * FROM [publication] WHERE ((([character] LIKE '%' + @character + '%') AND ([type] = @type)) OR(([f11623] LIKE '%' + @f11623 + '%') AND ([type] = @type)) OR (([f1character] LIKE '%' + @f1character + '%') AND ([type] = @type)) OR(([nortonoxfordnumber] LIKE '%' + @nortonoxfordnumber + '%') AND ([type] = @type)) OR (([nortonoxfordtext] LIKE '%' + @nortonoxfordtext + '%') AND ([type] = @type)))"> <SelectParameters> <asp:ControlParameter ControlID="TextBox1" Name="character" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="TextBox1" Name="f11623" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="TextBox1" Name="f1character" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="TextBox1" Name="nortonoxfordnumber" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="TextBox1" Name="nortonoxfordtext" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="DropDownList1" Name="type" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:SqlDataSource>
I am also using a dropdown box and a textbox for people to search within a particular area from the dropdown list.
Now, I would like to be able to highlight the keywords in my gridview table. I searched around on the Internet and found a lot of samples, but they are all related to the Gridview <templates>, however, I am using <BoundField> and sqlDataSource.
I just cound not figure out how can I add this highlight function to my current search function?
As a newbie coming from a Java background with tag libraries I wonder if there is a simple possibility to render areas depending on backend values.For example if I have search form I do not want to render the table for the search results as long as the user hasn't pressed the search button. Of course I can iterate over the model containing an empty list but this does not allow to suppress rendering the whole table.Using web forms I would just control the visibility of the affected tag(s) in the code behind file but how do I do this with ASP.NET MVC?Can I use a partital view for a case like this? But I think I would have the same problem. How can I determine if a partial view is rendered (e.g. the whole result table with header)?
What's the best method to allow a user to search in a specific field for a record(s) containing the keywords they enter into a textbox? I am considering using the streamreader to obatin the values from textbox into an array, so I can build dynamic query using the stringbuilder. Is there a cleaner or more efficient method to approach this common search functionality?
i have some text boxs in a page and in the same page there will be a table 'grid' like for holding the search result.When the user start editing and of the textbox above, the search must start by sending all textboxs values to the server 'ajax', and get back with the results to fill the below grid.
Notes:This grid should support paging, sorting by clicking on headers and it will contains some controls beside the results such as checkboxs for boolean values and links for opening details in another page.
I know many ways to do this some of them are:1- updatepanel around all of these controls and thats it "fast dirty solution"
2- send the search criteria using ajax request using JQuery post function for example and get back the JSON result, and using a template will draw the grid "clean but will take time to finish and will be harder to edit later".
3- ....My question is:What do you think will be the best choice to implement this scenario? because i face this scenario too much, and want to know which implementation will be better regarding performance, optimization, and time to finish.
I have a database filled with information about a bunch of different articles. I'm trying to add a search mechanisim to the site where you would type in what you are looking for, and it would search through the articles finding the most appropriate article. In my database I have a bunch of different fields that will help find the best article. For example, for each article, there is a title, description, category, a bunch of tags, Number of page views, number of votes, and the sum of all the vote scores. All this informaiton i believe can be used to gather the most relevent article based on the persons search terms. The problem is I don't know what to do with this information. What I would like to do is have a scoring system where the highest score is the first result and the lowest score is the last result. Where the first result is the most relevent.
So for example: The user types in "Korean War" it looks through all the articles, and gives all the articles with "Korean War" in the title + 1, all the tags with "Korean" or "War" + .1, then adds the number of views/1000, and then adds the average vote/4. (I just made that scoring system up on the spot, I would need to do some testing of course). Then it would sort the articles based upon the score it recieved. Is there anyway to do this with a select statement where I can run all of the calculations and then sort them with an "ORDER BY" command? Or would i have to have the server side code do the calculations store them in an array, and then sort them in the array? Or is there a better way of doing this that I might not know of (which is certainly possible).
i want make the search box for my website same like google have for it's site(ajax search box).i want as soon as i type something in my search box the realted link's of my site should be availble for the user.
I am trying to make an asp site where someone types in a search term, then google (or any search engine) is searched for that search term and the resulting urls are compiled into a database.
Is this possible? How would i access the search results?I have seen other websites that do something similar - for example on one site you type in your search term and your website, and it comes back with which page your site is for that search term - how does it access the search results?
I have a ASP.NET (VB) Dynamic Data Project in ASP.NET 4.0. It works great - and offers filtering - but now I want to add searching to it. What is the best way to accomplish this in ASP.NET 4.0? Is there any built-in functionality for performing searches declaratively?