tags:

views:

952

answers:

3
A: 

Have you tried adding the whole meta tag programmatically?
Once you get the to run server-side, add your new tag dynamically on Page_Load() and you can specify all its attributes.

The process is well described here:
http://www.howtoadvice.com/SetMetaTags

Jorge Alves
Oops, just read your note on HtmlMeta.
Jorge Alves
+1  A: 

Maybe this code inside the head tag will be what you need:

<%= string.Format("<meta http-equiv='refresh' content='10;url=http://contact.test.net/main.aspx?{0}' />", Request.QueryString.ToString()) %>

However, I wouldn't advise you to do it this way. For example, this URL:

http:/mysite.with.metaredirect?<script>alert('hello!!!')</script>

will throw an exception in asp.net if you haven't disabled its security features, and you never know if someone (or even yourself) will turn those off for some other reason.

A code-behind massage of the querystring is strongly advised!

Jorge Alves
Good call!!! "Server Error in '/' Application." = Epic Fail :(
regex
A: 

Remove the runat="server" attribute from <head>

michielvoo