replace tag value programically

T

Tomas

Since you can have only one server-side form in ASP.NET, and the one above
isn't it, you'll need to do this through client-side JavaScript, something
like:

ClientScript.RegisterStartupScript(GetType(), "setAction",
"document.getElementById('cse-search-box').action='...';", true);

However, generally speaking this isn't the way ASP.NET works - what are
you trying to do...?

This is Adsence Search code and it works fine in my asp.net application, I
keep code outside of asp.net form.

What I want to do is to replace that script form Action tag when I debug
application on my pc, set it to localhost instead of my server url.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top