C# Tutorials and offshore development in India

Tutorials Resources Forum Reviews Interview Jobs Projects Training Your Ad Here


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...




Resources » Code Snippets » ASP.NET WebForms »

A simple Search bar


Posted Date: 15 Sep 2009    Resource Type: Code Snippets    Category: ASP.NET WebForms
Author: arunMember Level: Gold    
Rating: 1 out of 5Points: 5



Here I have explained how we can add google search in our own website. In the below code < form> tag I have used a < b>get< /b> method with < b>action< /b> as :< b>//www.google.com/search.< /b>
Now when you click on search button you will be redirected to google search
Since this is a demo I have used DNS in value field.
you can put your website name in the value field.

< form id="form1" runat="server" method="get" action="http://www.google.com/search">

< div style="border: 1px solid black; padding: 4px; width: 20em;">
< table border="0" cellpadding="0">
< tr>
< td>
< input type="text" name="q" size="25" maxlength="255" value="" />
< input type="submit" value="Google Search" />< /td>
< /tr>
< tr>
< td align="center" style="font-size: 75%">
< input type="checkbox" name="sitesearch" value="dotnetspider.com" checked />
only search mysite< br />
< /td>
< tr>
< /table>
< /div>



Responses to the resource: "A simple Search bar"

No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Google search  .  Add google search in your site  .  Google search bar  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Bulleted List
Previous Resource: IDictionary to Load Dropdownlist with key value pair
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
More Resources




About Us    Contact Us    Privacy Policy    Terms Of Use