简体   繁体   中英

Javascript Disabled NoScript Tag Within Master Page Content Pages

My Issue is I can't redirect to page which is in the root of the solution if my javascript is disabled.

Test.aspx is a content page and its using MasterPage

Now I have written below Code to detect Javascript disabled or not.

<noscript>
   <meta http-equiv="Refresh" content="0;URL=Javascript_Disabled.aspx" />
</noscript>

When I open my Test.aspx and if my javascript is disabled this its tries to find in my Test Folder but javascript_Disabled.aspx but actually its in my root folder.

but I am getting this URL : http://mytestweb/Client/Test/Test/Javascript_Disabled.aspx

How can i pass dynamic url to the noscript tag

在此处输入图片说明

Seems like you are missing the "/" in your url. Try this it should work

<meta http-equiv="Refresh" content="0;URL=/Javascript_Disabled.aspx" />

Your current URL resolves into an relative url which results in

http://mytestweb/Client/Test/Test/Javascript_Disabled.aspx

Adding "/" will make it refer to the root directory of your website / project resulting into an absolute url resulting into the desired url.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM