What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 10934 |  Welcome, Guest!   Register  Login
 Home > Forums > ASP.NET > how to search asp.net textbox value in google ? ...
Hariinakoti

how to search asp.net textbox value in google ?

Replies: 2 | Posted by: Hariinakoti on 8/14/2012 | Category: ASP.NET Forums | Views: 686 | Status: [Member] | Points: 10  


hi friends,
how to search our asp.net text box value in google search?
If we type some string in that textbox and search that string in google.

Thanks & Regards
Hari


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Hariinakoti
Hariinakoti  
Posted on: 8/16/2012 1:52:07 AM
Level: Starter | Status: [Member] | Points: 25

I got solution..

Thanks & Regards
Hari

Hariinakoti, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Hariinakoti
Hariinakoti  
Posted on: 8/16/2012 1:54:32 AM
Level: Starter | Status: [Member] | Points: 25

Resolved

protected void btnsearch_Click(object sender, EventArgs e)
{
try
{
string name = string.Empty;
StringBuilder queryaddress = new StringBuilder();
queryaddress.Append("http://google.com/search?q=");
if (txtsearch.Text != string.Empty)
{
name = txtsearch.Text.Replace(' ', '+');
queryaddress.Append(name + ' ' + '+');
}
string url = queryaddress.ToString();
Response.Redirect(url, false);
}

catch (Exception ex)
{
Response.Redirect(ex.ToString());
}
}

Thanks & Regards
Hari

Hariinakoti, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/25/2013 12:22:16 PM