I am creating a dynamic Website, in which i want to use search Functionality in ASP.Net using C#. When user enters the value in the textbox then that value search in my website..??
what is its method and how can i do this.??
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gomathi PalaniswamyPosted Oct 1, 2010, 3:31 AM
use the below coding to search web page.
if (TextBox1.Text != "")
{
int count = 0,count1=0,count2=0,count3=0;
string final="", final1="", final2="", final3="";
string address3 = "http://www.scholarpedia.org/article/Special:Search?from=sidebar&search="+TextBox1.Text+"&go=Title";
HttpWebRequest request3=(HttpWebRequest)WebRequest.Create(address3);
WebResponse response3=request3.GetResponse();
StreamReader reader3=new StreamReader(response3.GetResponseStream(),Encoding.UTF8);
string result3 = reader3.ReadToEnd();
reader3.Close();
if (result3.Contains("Scholarpedia"))
{
int i = result3.IndexOf("Search results");
int j = result3.IndexOf("