locked
Google adsense search box on a .Net web forms page? RRS feed

  • Question

  • User-334127265 posted

    I cannot get it right so I have to ask. Is it possible to put a Google adsense search box on a .Net web forms page? the google search box needs its own set of <form></form> tags and a web forms page is allways included entirely with its set of formtags?

    Monday, July 26, 2010 5:55 PM

All replies

  • User-42918493 posted

    Its working for me.... try this...

    protected void btnSearch_Click(object sender, EventArgs e)
        {

    Response.Redirect("http://www.mysite.com/search.aspx?q=" + Server.UrlEncode(txtSearch.Text) + "&cx=partner-pub-7294485339189776%3Avlf7gg8zsh3&cof=FORID%3A9&ie=UTF-8&sa=Search&siteurl=www.mysite.com%2FgoogleSearch.htm#1024");

    }

    Tuesday, July 27, 2010 12:41 AM