Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Passing variable from text control to google custome search engine CSE

$
0
0

Hi,

I have a textBox in the index page and I want it to take the value from this text to the google search engine in another page.

how can i pass this variable from control to the cse?

This is the index code for passing the variable

Response.Redirect("Search.aspx?parma=" + TextBox1.Text);

and this is cse code

<script>
            (function () {
                var cx = '003646811200027851123:9ubv0q_x_z0';
                var gcse = document.createElement('script');
                gcse.type = 'text/javascript';
                gcse.async = true;
                gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(gcse, s);
            })();</script><gcse:search></gcse:search>






Viewing all articles
Browse latest Browse all 23244

Trending Articles