User1224194097 posted
Try this
<script type="text/javascript">
function searchGoogle() {
window.location.href = 'http://www.google.com/search?hl=en&q=' +
document.getElementById('<%= txtSearch.ClientID %>').value;
}
</script>
<asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
<button onclick="searchGoogle();">
Search</button>
If you want to open a popup window with search text, use this
window.open('http://www.google.com/search?hl=en&q=' +
document.getElementById('<%= txtSearch.ClientID %>').value);