replace tag value programically

  • Thread starter Thread starter Tomas
  • Start date Start date
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.
 
Back
Top