Hello everyone,
I am using Microsoft Search Server 2008 + C# + .Net 3.5 + VSTS 2008 + ASP.Net to develop a web application which invokes Search Server 2008 Web Services when a button in the html page is pressed.
I am using the following code to query content from Microsoft Search Server 2008. My question is how to display the search results from the DataSet retrieved? I did not find a very good sample from Google.
protected void Button1_Click(object sender, EventArgs e)
{
//The string containing the keyword to use in the search
string keywordString = "Microsoft";
//The XML string containing the query request information
//for the Web service
string qXMLString = "<QueryPacket xmlns='urn:Microsoft.Search.Query'>" +
"<Query><SupportedFormats><Format revision='1'>" +
"urn:Microsoft.Search.Response.Document:Document</Format>" +
"</SupportedFormats><Context><QueryText language='en-US' type='STRING'>" +
keywordString + "</QueryText></Context></Query></QueryPacket>";
SearchTest.QueryService queryService = new SearchTest.QueryService();
queryService.Credentials = System.Net.CredentialCache.DefaultCredentials;
DataSet ds = queryService.QueryEx(qXMLString);
}
thanks in advance, George