Switching ASP
A general question.....is it bad practise to construct a form which 'switches' from HTML to ASP a lot throughout its length? Should the form be written with "response.write"s and keep it all ASP code in one section in the middle of the form, so the server just switches once, or does the multiple switching of server engines not cause any problem ?...whats ur thoughts here ?..
View Replies
I need to figure out how to make ASP add in the appropriate style sheet. Basically I want it to look, see what page it is on and say, 'Ok ... if this is the home page, use this style sheet ... if it is not, use this other style sheet.'
View Replies
View Related
I wish to have a web site that has most of the pages as normal HTTP pages
but has some areas that use HTTPS. I want to have it that if a user selects
a link to a HTTPS page that they go there an there Session Information is
kept. I also wish to have the pages switch automatically to HTTPS if a
visitor types the URL without the HTTPS. So my questions are:
1) How to redirect to a Secure Page without losing Session Info?
2) How to test if page is accessed by HTTPS, and if not switch to HTTPS
quickly?
I think something like this code is what I want but how do I do it.
<%
if not "HTTPS" then
response.redirect(https://mysite.com/securepage.asp)
end if
%>
View Replies
View Related
Code:
<%
Dim currentDesign, tempCSS
currentDesign = "default.css"
tempCSS = Request.QueryString("cssfile")
If tempCSS <> "" Then currentDesign = tempCSS
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>West Cheshire College</title>
<link rel="stylesheet" type="text/css" href="<%=currentDesign%>" title="default" media="screen" />
</head>
<body>
<div class="content">chaaaaaaaaannnnnnnnggggggggeeee</div>
<p>
<a href="default.asp?cssfile=bluetext.css">Change Style</a>
</body>
</html>
So I have the two style sheets, default and blue text...the asp switches the style sheets around.
What I need now is for the var to be remembered...any suggestions?
View Replies
View Related