Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How to compare browser searching string with string in c#?
Ajinkya Ban
Apr 25 2014 1:59 AM
984
Reply
Hi,
I want to compare the string that entered into browser and if my string match with the keyword which are decalared into c# gives the message to the user that is "Correct".
For Ex:
Suppose i m enter the keyword "Digital Camera" in google chrome and my keyword contains the same name then displays messages "Correct"
This is my code but not working.
public void funct387()
{
Boolean mess = false;
string url = ie.LocationURL.ToString();
//string keyword = ie.Name.Contains("digital camera").ToString();
if (url.Contains("digital camera"))
{
mess = true;
}
canceliecommand();
if (mess)
{
BTS_Exam.Messagebox.Messagebox3 m1 = new BTS_Exam.Messagebox.Messagebox3();
m1.ShowDialog();
}
else
{
BTS_Exam.Messagebox.Messagebox4 m1 = new BTS_Exam.Messagebox.Messagebox4();
m1.ShowDialog();
}
}
Thanks in advance..
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to Create http request using javascript in c#
How To display the Sum Of Columns in Each Pages in RDLC