Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic includes ?? 1

Status
Not open for further replies.

browolf

Programmer
Dec 18, 2001
442
GB
i got this off the net, it works but i dont see why.

<%
Dim whichpage
whichpage = Request.QueryString(&quot;page&quot;)
Select Case whichpage
Case &quot;default&quot;
%>
<!-- #include file=&quot;default.asp&quot; -->
<% Case &quot;main&quot; %>
<!-- #include file=&quot;main.asp&quot; -->
<% Case &quot;admin&quot; %>
<!-- #include file=&quot;admin.asp&quot; -->
<% Case Else %>
<!-- #include file=&quot;default.asp&quot; -->
<%End Select%>

can someone explain? thanks ===============
Security Forums
 
>> it works but i dont see why

What did you expect to not work that is working?

The content of every include file will be pasted into the page (view source). The CASE statement will then just execute whichever section you select in the querystring value. --James
 
oh right.
i think i get it now. just need someone to put it in the right words.

b4 i couldnt see that the case statements could affect the html between them.


===============
Security Forums
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top