473,421 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 software developers and data experts.

noscript adding dynamic meta tag

Dst
<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.AppendHeader("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 ?

Aug 18 '06 #1
2 3608
Here is one way:

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

In the .aspx have:

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

Hope this helps?

"Dst" <ds******@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.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.AppendHeader("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 ?

Aug 18 '06 #2
Dst
Sweet, works like a charm.
Siva M wrote:
Here is one way:

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

In the .aspx have:

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

Hope this helps?
Aug 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Roel Wuyts | last post by:
CALL FOR CONTRIBUTIONS International Workshop on Revival of Dynamic Languages http://pico.vub.ac.be/~wdmeuter/RDL04/index.html (at OOPSLA2004, Vancouver, British Columbia, Canada, October...
6
by: Gustav Medler | last post by:
Hello, there is a known problem with Opera and the execution of content shown in <NOSCRIPT> tag. Everythings works fine, if there is only one simple script like:...
4
by: Daniel Keller | last post by:
Hello! I'm trying to set up a page system using "dynamic" SSI. That means that I normally use the following on my website: <!--#include virtual="file.inc" --> Now I want to make this...
12
by: Burton Figg | last post by:
My homepage, www.jimpix.co.uk uses transitional XHTML. The whole thing validates except one line: <noscript><img height="1" width="1" alt=""...
0
by: Elton W | last post by:
Hi Peter, You use DeleteButton.Attributes.Add("onclick", "return confirm ('Are you sure you want to delete?');"); in datagrid_ItemDataBound event to add confirmation for delete button.
3
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users...
0
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab,...
2
nathj
by: nathj | last post by:
Hi, I am working on a site that will use JavaScript to validate user entered data at the client side prior to sending it to the server side. I also want to be able to provide a page that...
5
by: Nick | last post by:
Hi there, I am adding a meta redirect tag to the page dynamically on 2 separate pages in asp.net. One of the pages it works fine, and 5 seconds after the page appears, the redirect occurs. On...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.