noscript adding dynamic meta tag

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dst

    noscript adding dynamic meta tag

    <head runat="server">
    <noscript>
    <meta http-equiv='refresh' content='0;url= Unsupported.htm '/>
    </noscript>
    </head>


    If i add this to my webform, it redirects to Unsupported.htm if
    javascript is disabled.

    But i'm trying to make a utility class that will add this code
    serverside.
    Is it possible to add this to the resonse header server side:
    <noscript>
    <meta http-equiv='refresh' content='0;url= Unsupported.htm '/>
    </noscript>

    I have only seen exampes like this:
    Response.Append Header("Refresh ", "0; url=Unsupported .htm");
    But this of course always redirects, because it has no noscript tags.
    Not sure how i can add this with noscript tags..

    Anyone ?

  • Siva M

    #2
    Re: noscript adding dynamic meta tag

    Here is one way:

    Declare a protected class-level string var as:
    protected string noScriptTag = "<noscript><met a http-equiv=\"refresh \"
    content=\"0;a.h tm\" /></noscript>";

    In the .aspx have:

    <html>
    <head runat="server">
    <%= noScriptTag %>
    <title>Untitl ed Page</title>
    .... ...

    Hope this helps?

    "Dst" <dstructr@gmail .comwrote in message
    news:1155888753 .378494.130490@ i3g2000cwc.goog legroups.com...
    <head runat="server">
    <noscript>
    <meta http-equiv='refresh' content='0;url= Unsupported.htm '/>
    </noscript>
    </head>


    If i add this to my webform, it redirects to Unsupported.htm if
    javascript is disabled.

    But i'm trying to make a utility class that will add this code
    serverside.
    Is it possible to add this to the resonse header server side:
    <noscript>
    <meta http-equiv='refresh' content='0;url= Unsupported.htm '/>
    </noscript>

    I have only seen exampes like this:
    Response.Append Header("Refresh ", "0; url=Unsupported .htm");
    But this of course always redirects, because it has no noscript tags.
    Not sure how i can add this with noscript tags..

    Anyone ?

    Comment

    • Dst

      #3
      Re: noscript adding dynamic meta tag

      Sweet, works like a charm.


      Siva M wrote:
      Here is one way:
      >
      Declare a protected class-level string var as:
      protected string noScriptTag = "<noscript><met a http-equiv=\"refresh \"
      content=\"0;a.h tm\" /></noscript>";
      >
      In the .aspx have:
      >
      <html>
      <head runat="server">
      <%= noScriptTag %>
      <title>Untitl ed Page</title>
      ... ...
      >
      Hope this helps?

      Comment

      Working...