Thursday, January 6, 2011

Custom Google Search in ASP.net





Add textbox and button for making search ..as:

Add this on web form
      <asp:TextBox id="txtSearch" runat="server" CssClass="textboxGoogle"
                    Width="168px"></asp:TextBox>&nbsp;<asp:Button
                    id="btnSearchGoogle" runat="server" Text="Search" CausesValidation="False"
                    CssClass="Button" onclick="btnSearchGoogle_Click" Width="61px"></asp:Button>



write this code on the search button

Response.Redirect("http://www.google.com/custom?domains=www.liotechnologies.com&q=" + txtSearch.Text + "&sa=Search&sitesearch=&client=pub-&forid=1&channel=91&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%3A%%3BL%3Ahttp%3A%2F%2Fwww.mysite.co m%2FImages%2FGoogle01.gif%3BS%3Ahttp%3A%2F%2Fwww.m ysite.com%3BFO1%3B&hl=en");

No comments :

Post a Comment