ASP.NET Adding Javascript to page if page not secure

Posted by user204588 on Stack Overflow See other posts from Stack Overflow or by user204588
Published on 2010-04-08T01:45:27Z Indexed on 2010/04/08 1:53 UTC
Read the original article Hit count: 399

Filed under:
|

Hello,

I'm trying to add some share this javascript in between the head tags of an asp.net page but only if the page is not secure (!Request.IsSecureConnection). How do I get the code in the head tags to check for secure connection and then write the javascript if not secure. I've tried using <% %> blocks and RegisterStartupScriptBlock and it's not working

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript