Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to pass the information from a text box of asp.net to google page, which will search the specific string in google and show the result. will any one kindly help me ?

Warm Regards,
Arshad
Posted
Updated 10-Jan-12 3:12am
v2

Hi,
Get a best example on codeProject expert;
Google Like Search TextBox[^]
 
Share this answer
 
hi u can get by,

string searchstr=txtSearch.Text


HTML
http://lmgtfy.com/?q=searchstr
 
Share this answer
 
Big deal? The below code will show the Google search in new page based on your search, just try that
XML
<html>
<head>
<title>Show search results in new window</title>
<script language="javascript" type="text/javascript">
function openwin()
{
    window.open("http://www.google.com/search.aspx?q=" + document.getElementById("txtText").value ,"NewWindow","width=500,height=500");
}
</script>
</head>
<body>
<input type="text" id="txtText">
<A href="javascript: openwin()">Search</A>
</body>
</html>
 
Share this answer
 
Comments
arshad alam 11-Jan-12 1:25am    
can it be in the same window...
thatraja 11-Jan-12 5:17am    
You can, use window.location or etc., you can find more in google.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900