<% Dim main_blnASPMB Dim main_blnASPFAQS ' Figure out where the hell we are! ' Are we on aspmessageboard? If Request.ServerVariables("LOCAL_ADDR") = "10.2.41.31" Then 'If Request.ServerVariables("URL") = "/template/test.asp" Then main_blnASPMB = True Else main_blnASPMB = False ' If we're not on MB, we must be on 4guys... are we in /aspfaqs If Left(LCase(Request.ServerVariables("URL")), 9) = "/aspfaqs/" Then main_blnASPFAQS = True Else ' Not MB or FAQS = 4guys plain main_blnASPFAQS = False End If End If %> <% Dim indexPages set indexPages=CreateObject("Scripting.Dictionary") indexPages.Add "index.shtml", "index.shtml" indexPages.Add "security.asp", "security.asp" %> <% sub ShowBanner(ByVal iNum) Select Case iNum Case 0 ' handle homepage (other pages?) where no 468 banners are called. ' Not in use! %> <% Case 1 mainShowQUADBanner("468x60-1") Response.Write "

" & vbCrLf %>
<%mainShowQUADBanner("ciu") %>
<%Case Else mainShowQUADBanner("468x60-2") End Select end sub Sub ShowButton() 'Response.Write "
" 'ShowOasAdBanner("marketplace01") 'ShowOasAdBanner("marketplace02") 'Response.Write "
" 'ShowOasAdBanner("marketplace03") 'Response.Write "
" 'ShowOasAdBanner("marketplace04") 'ShowOasAdBanner("marketplace05") 'ShowOasAdBanner("marketplace06") 'ShowOasAdBanner("marketplace07") 'ShowOasAdBanner("marketplace08") 'ShowOasAdBanner("marketplace09") 'ShowOasAdBanner("marketplace10") 'Response.Write "
" End Sub ' Copied from ASP 101... not using full functionality ' ' Sets JavaScript to show INTM banners: ' Handles sectional targetting for home page within. ' strBanner is the position indicator (ie. 468x60-1). ' Hotwired strBanner="javascript" to insert the call to the appropriate javascript file. ' Don't forget to modify JS file as well when modifying ad positions! Sub ShowOasAdBanner(strBannerPosition) Dim strCurrentFilePath Dim strEmailTargetting Dim strPositionsRequired strCurrentFilePath = LCase(Request.ServerVariables("URL")) ' Spit out JavaScript line: If LCase(strBannerPosition) = "javascript" Then %> <% Select Case strCurrentFilePath Case "/webtech/learnmore/email.asp", "/webtech/112298-1.shtml", "/webtech/faq/email/faq6.shtml", "/webtech/041599-2.shtml", "/webtech/faq/email/faq1.shtml", "/webtech/071599-1.shtml", "/webtech/043000-1.shtml", "/webtech/101998-1.shtml", "/webtech/073100-1.shtml" Response.Write "" Case "/index.shtml" Response.Write "" Case Else If main_blnASPMB Then Response.Write "" Else Response.Write "" End If End Select Else ' Process standard banner call: ' Determine banners needed strPositionsRequired = "468x60-1,468x60-2,marketplace01,marketplace02,marketplace03,marketplace04,marketplace05,marketplace06,marketplace07,marketplace08,marketplace09,marketplace10,cp1,cp2,cp3,cp4,cp5,cp6,cp7,cp8,cp9,cp10,cp11,cp12,cp13,cp14,ciu,house_ribbon,flex,125x125-1,120x60-1,accessunit" ' Select Case LCase(strCurrentFilePath) ' Case "/index.shtml" ' strPositionsRequired = strPositionsRequired & ",flex" ' Case Else ' 'strPositionsRequired = strPositionsRequired & ",flex" ' End Select ' Spit out banner text Response.Write "" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf End If End Sub %> <% Sub mainShowQUADBanner(strBannerPosition) Dim positionkey If letter_mappings.Exists(strBannerPosition) then positionkey = letter_mappings.Item(strBannerPosition) Else Exit Sub End if strCurrentSectionName = currentSectionName If (strCurrentSectionName <> "home" and strCurrentSectionName <> "") then urlkey = "www.4guysfromrolla.com/" & strCurrentSectionName else urlkey = "www.4guysfromrolla.com" End if Dim lstIndxOf,lstPeNm lstIndxOf=InStrRev(currentFilePath,"/")+1 If lstIndxOf <> 0 Then lstPeNm=LCase(Mid(currentFilePath ,lstIndxOf,Len(currentFilePath))) end if If (indexPages.Exists(lstPeNm)) then pagekey = "index" else pagekey = "other" End if 'Response.write(strBannerPosition) 'response.write("
") 'response.write(strCurrentFilePath) 'response.write("
") 'response.write(urlkey) 'response.write("
") 'response.write(pagekey) 'response.write("
") 'response.write(positionkey) 'response.write("
") 'Response.write("") if(StrComp(strBannerPosition,"interstitial")=0) then GetQUADScriptforInterstitialAd urlkey, pagekey, positionkey Else GetQUADScript urlkey, pagekey, positionkey End If End Sub Sub GetQUADScriptforInterstitialAd (urlkey, pagekey, positionkey) Dim strquad_position, strquad_type, stroas, strzflag_nid, strzflag_cid, strzflag_sid, strzflag_sz, strzflag_width, strzflag_height,strzflag_x 'checks whether the current URL is present into the QUAD_ads from the config If (QUAD_ads.Exists(urlkey)=false) then call keyExistsLikeAd(QUAD_ads,urlkey) end if 'if ad not found for suitable look for default values On Error Resume Next Dim page_data page_data=QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_cid") If Err.Number > 0 OR page_data="" Then 'set the default values If (adExists=false) then Dim URLS,PAGES URLS = QUAD_ads.Keys urlkey=URLS(0) ' current URL PAGES =QUAD_ads.Item(URLS(0)).Keys pagekey=PAGES(0) ' current page 'If the current page accessed is or page If Len(lastPageName & "") <> 0 and indexPages.Exists(lastPageName)=false Then pagekey=PAGES(1) ' page end if end if End If On Error GoTo 0 ' turn error handling off again If (QUAD_ads(urlkey)(pagekey).Exists(positionkey)) then strquad_position = QUAD_ads(urlkey)(pagekey)(positionkey)("quad_position") strquad_type = QUAD_ads(urlkey)(pagekey)(positionkey)("quad_type") stroas = QUAD_ads(urlkey)(pagekey)(positionkey)("oas") 'strpage_channel = QUAD_ads(urlkey)(pagekey)(positionkey)("page_channel") strzflag_nid = QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_nid") strzflag_cid = QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_cid") strzflag_sid = QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_sid") strzflag_sz = QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_sz") strzflag_width = QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_width") strzflag_height = QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_height") strzflag_x = QUAD_ads(urlkey)(pagekey)(positionkey)("zflag_x") Response.write("") End If End Sub Function keyExistsLikeAd(QUAD_ads,urlkey) Dim keys,i,configURLpatern 'Create some variables keys = QUAD_ads.keys 'Get the keys For i = 0 To QUAD_ads.Count -1 'Iterate the array configURLpatern=keys(i) if(InStr(configURLpatern, urlkey)>0)then 'we have such URL pattern then set taht as urlkey urlkey=configURLpatern exit for end if Next End Function Function mainGetCurrentSectionName(strFullPath) Dim iLocation Dim strTemp iLocation = InStr(2, strFullPath, "/", 1) If iLocation = 0 Then strTemp = "home" Else strTemp = Mid(strFullPath, 2, iLocation - 2) End If mainGetCurrentSectionName = LCase(strTemp) End Function %> <% 'Display the Internet.com meta tags 'ASSUMED VARIABLES DECLARED: '=========================== ' strPageTitle -> Title of the Article/Web page ' strPageDesc -> Description of the Article/Web page ' strPageAuthor -> Author of the Article/Web page ' strPageKeywords -> Keywords for the Article/Web page ' strPageDate -> The date the Article/Web page was first added ' strPageSection -> The section that the article/web page appears in 'Set defaults for these variables if they are not declared if Len(strPageTitle) = 0 then If main_blnASPMB Then strPageTitle = "ASPMessageboard.com" Else strPageTitle = "4GuysFromRolla.com" End If else If main_blnASPMB Then If not(dontMolestTitle = true) then if Left(UCase(strPageTitle),15) <> "ASPMESSAGEBOARD" then strPageTitle = "ASPMessageboard.com - " & strPageTitle end if End If Else if Left(UCase(strPageTitle),21) <> "4GUYSFROMROLLA.COM - " then strPageTitle = "4GuysFromRolla.com - " & strPageTitle end if End If if Left(UCase(strPageTitle),21) = "4GUYSFROMROLLA.COM - " Then strPageTitle = Replace(strPageTitle, "4GuysFromRolla.com - ", "") strPageTitle = strPageTitle & " - 4GuysFromRolla.com" End IF end if if Len(strPageAuthor) = 0 then strPageAuthor = "Scott Mitchell" if Len(strPageKeywords) = 0 then strPageKeywords = "ASP Web technology Microsoft" 'Write out the META tags and TITLE tag %> <%=strPageTitle%> <% If Len(strPageDate) > 0 then Response.Write " " End If If autoRefresh then Response.Write " " End If If Len(strPageDesc) = 0 Then strPageDesc = "4Guys is an online resource site for ASP and ASP.NET information!" strPageKeywords = strPageKeywords & " asp, asp.net, sql, javascript, vbscript, database, date, .net, array, validation, code, request.servervariables, server.mappath, xmlhttp, guys from rolla, css buttons, sql injection, datagrid paging, microsoft.xmlhttp, sql case, stored procedure, 4guysfromrolla, adovbs.inc, 4guysfromrolla.com, asp date functions, asp.net interview questions, microsoft interview questions, vbscript date" %> <% If Len(strPageSection) > 0 then Response.Write " " ElseIf Len(strSection) > 0 then Response.Write " " End If %> <% If main_blnASPMB Then %> <% End If %> <% 'June 2013 - Version 1.1 by Gerrit van Kuipers Class aspJSON Public data Private p_JSONstring Private p_datatype private aj_in_string, aj_in_escape, aj_i_tmp, aj_char_tmp, aj_s_tmp, aj_line_tmp, aj_line, aj_lines, aj_currentlevel, aj_currentkey, aj_currentvalue, aj_newlabel Private Sub Class_Initialize() Set data = Collection() p_datatype = "{}" End Sub Private Sub Class_Terminate() Set data = Nothing End Sub Public Function loadJSON(strInput) if len(trim(strInput)) = 0 then Err.Raise 1, "loadJSON Error", "No data to load." p_JSONstring = CleanUpJSONstring(Trim(strInput)) aj_lines = Split(p_JSONstring, Chr(13) & Chr(10)) Dim level(99) aj_currentlevel = 1 Set level(aj_currentlevel) = data For Each aj_line In aj_lines aj_currentkey = "" aj_currentvalue = "" If Instr(aj_line, ":") > 0 Then aj_in_string = False aj_in_escape = False For aj_i_tmp = 1 To Len(aj_line) If aj_in_escape Then aj_in_escape = False Else Select Case Mid(aj_line, aj_i_tmp, 1) Case """" aj_in_string = Not aj_in_string Case ":" If Not aj_in_escape Then aj_currentkey = Left(aj_line, aj_i_tmp - 1) aj_currentvalue = Mid(aj_line, aj_i_tmp + 1) Exit For End If Case "\" aj_in_escape = True End Select End If Next aj_currentkey = aj_Strip(aj_JSONDecode(aj_currentkey), """") If Not level(aj_currentlevel).exists(aj_currentkey) Then level(aj_currentlevel).Add aj_currentkey, "" End If If right(aj_line,1) = "{" Or right(aj_line,1) = "[" Then If Len(aj_currentkey) = 0 Then aj_currentkey = level(aj_currentlevel).Count Set level(aj_currentlevel).Item(aj_currentkey) = Collection() Set level(aj_currentlevel + 1) = level(aj_currentlevel).Item(aj_currentkey) aj_currentlevel = aj_currentlevel + 1 aj_currentkey = "" ElseIf right(aj_line,1) = "}" Or right(aj_line,1) = "]" or right(aj_line,2) = "}," Or right(aj_line,2) = "]," Then aj_currentlevel = aj_currentlevel - 1 ElseIf Len(Trim(aj_line)) > 0 Then if Len(aj_currentvalue) = 0 Then aj_currentvalue = getJSONValue(aj_line) aj_currentvalue = getJSONValue(aj_currentvalue) If Len(aj_currentkey) = 0 Then aj_currentkey = level(aj_currentlevel).Count level(aj_currentlevel).Item(aj_currentkey) = aj_currentvalue End If Next End Function Public Function Collection() set Collection = Server.CreateObject("Scripting.Dictionary") End Function Public Function AddToCollection(dictobj) if TypeName(dictobj) <> "Dictionary" then Err.Raise 1, "AddToCollection Error", "Not a collection." aj_newlabel = dictobj.Count dictobj.Add aj_newlabel, Collection() set AddToCollection = dictobj.item(aj_newlabel) end function Private Function CleanUpJSONstring(aj_originalstring) aj_originalstring = Replace(aj_originalstring, Chr(13) & Chr(10), "") p_datatype = Left(aj_originalstring, 1) & Right(aj_originalstring, 1) aj_originalstring = Mid(aj_originalstring, 2, Len(aj_originalstring) - 2) aj_in_string = False : aj_in_escape = False : aj_s_tmp = "" For aj_i_tmp = 1 To Len(aj_originalstring) aj_char_tmp = Mid(aj_originalstring, aj_i_tmp, 1) If aj_in_escape Then aj_in_escape = False aj_s_tmp = aj_s_tmp & aj_char_tmp Else Select Case aj_char_tmp Case "\" : aj_in_escape = True Case """" : aj_s_tmp = aj_s_tmp & aj_char_tmp : aj_in_string = Not aj_in_string Case "{", "[" aj_s_tmp = aj_s_tmp & aj_char_tmp & aj_InlineIf(aj_in_string, "", Chr(13) & Chr(10)) Case "}", "]" aj_s_tmp = aj_s_tmp & aj_InlineIf(aj_in_string, "", Chr(13) & Chr(10)) & aj_char_tmp Case "," : aj_s_tmp = aj_s_tmp & aj_char_tmp & aj_InlineIf(aj_in_string, "", Chr(13) & Chr(10)) Case Else : aj_s_tmp = aj_s_tmp & aj_char_tmp End Select End If Next CleanUpJSONstring = "" aj_s_tmp = split(aj_s_tmp, Chr(13) & Chr(10)) For Each aj_line_tmp In aj_s_tmp aj_line_tmp = replace(replace(aj_line_tmp, chr(10), ""), chr(13), "") CleanUpJSONstring = CleanUpJSONstring & Trim(aj_line_tmp) & Chr(13) & Chr(10) Next End Function Private Function getJSONValue(ByVal val) val = Trim(val) If Left(val,1) = ":" Then val = Mid(val, 2) If Right(val,1) = "," Then val = Left(val, Len(val) - 1) val = Trim(val) Select Case val Case "true" : getJSONValue = True Case "false" : getJSONValue = False Case "null" : getJSONValue = Null Case Else If (Instr(val, """") = 0) Then If IsNumeric(val) Then getJSONValue = CDbl(val) Else getJSONValue = val End If Else If Left(val,1) = """" Then val = Mid(val, 2) If Right(val,1) = """" Then val = Left(val, Len(val) - 1) getJSONValue = aj_JSONDecode(Trim(val)) End If End Select End Function Private JSONoutput_level Public Function JSONoutput() JSONoutput_level = 1 JSONoutput = Left(p_datatype, 1) & Chr(13) & Chr(10) & GetDict(data) & Right(p_datatype, 1) End Function Private Function GetDict(objDict) dim aj_item, aj_keyvals, aj_label, aj_dicttype For Each aj_item In objDict Select Case TypeName(objDict.Item(aj_item)) Case "Dictionary" GetDict = GetDict & Space(JSONoutput_level * 4) aj_dicttype = "[]" For Each aj_label In objDict.Item(aj_item).Keys If Not IsInt(aj_label) Then aj_dicttype = "{}" Next If IsInt(aj_item) Then GetDict = GetDict & Left(aj_dicttype,1) & Chr(13) & Chr(10) Else GetDict = GetDict & """" & aj_JSONEncode(aj_item) & """" & ": " & Left(aj_dicttype,1) & Chr(13) & Chr(10) End If JSONoutput_level = JSONoutput_level + 1 aj_keyvals = objDict.Keys GetDict = GetDict & GetSubDict(objDict.Item(aj_item)) & Space(JSONoutput_level * 4) & Right(aj_dicttype,1) & aj_InlineIf(aj_item = aj_keyvals(objDict.Count - 1),"" , ",") & Chr(13) & Chr(10) Case Else aj_keyvals = objDict.Keys GetDict = GetDict & Space(JSONoutput_level * 4) & aj_InlineIf(IsInt(aj_item), "", """" & aj_JSONEncode(aj_item) & """: ") & WriteValue(objDict.Item(aj_item)) & aj_InlineIf(aj_item = aj_keyvals(objDict.Count - 1),"" , ",") & Chr(13) & Chr(10) End Select Next End Function Private Function IsInt(val) IsInt = (TypeName(val) = "Integer" Or TypeName(val) = "Long") End Function Private Function GetSubDict(objSubDict) GetSubDict = GetDict(objSubDict) JSONoutput_level= JSONoutput_level -1 End Function Private Function WriteValue(ByVal val) Select Case TypeName(val) Case "Double", "Integer", "Long": WriteValue = val Case "Null" : WriteValue = "null" Case "Boolean" : WriteValue = aj_InlineIf(val, "true", "false") Case Else : WriteValue = """" & aj_JSONEncode(val) & """" End Select End Function Private Function aj_JSONEncode(ByVal val) val = Replace(val, "\", "\\") val = Replace(val, """", "\""") 'val = Replace(val, "/", "\/") val = Replace(val, Chr(8), "\b") val = Replace(val, Chr(12), "\f") val = Replace(val, Chr(10), "\n") val = Replace(val, Chr(13), "\r") val = Replace(val, Chr(9), "\t") aj_JSONEncode = Trim(val) End Function Private Function aj_JSONDecode(ByVal val) val = Replace(val, "\""", """") val = Replace(val, "\\", "\") val = Replace(val, "\/", "/") val = Replace(val, "\b", Chr(8)) val = Replace(val, "\f", Chr(12)) val = Replace(val, "\n", Chr(10)) val = Replace(val, "\r", Chr(13)) val = Replace(val, "\t", Chr(9)) aj_JSONDecode = Trim(val) End Function Private Function aj_InlineIf(condition, returntrue, returnfalse) If condition Then aj_InlineIf = returntrue Else aj_InlineIf = returnfalse End Function Private Function aj_Strip(ByVal val, stripper) If Left(val, 1) = stripper Then val = Mid(val, 2) If Right(val, 1) = stripper Then val = Left(val, Len(val) - 1) aj_Strip = val End Function End Class %> <% config = "{ ""network"": ""5055"", ""vertical"": ""b2b"", ""brand"": ""dev"", ""site"": ""4guysfromrolla"", ""krux_id"": ""Jd_Givjm"", ""ga_id"": ""UA-48216601-1"", ""ml_id"": ""50409"", ""taxonomy"": ""B2B_PRODUCT_DEVELOPMENT_PROGRAMMING_LANGUAGES_ASP|B2B_PRODUCT_DEVELOPMENT_PLATFORM_FRAMEWORK_DOTNET|B2B_PRODUCT_DEVELOPMENT_PROGRAMMING_LANGUAGES_C#|B2B_PRODUCT_DEVELOPMENT_SERVER_SIDE"", ""keywords"": ""ASP Web technology Microsoft asp|asp.net|sql|javascript|vbscript|database|date|.net|array|validation|code|request.servervariables|server.mappath|xmlhttp|guys from rolla|css buttons|sql injection|datagrid paging|microsoft.xmlhttp|sql case|stored procedure,adovbs.inc,asp date functions|asp.net interview questions|microsoft interview questions|vbscript date""}" Set oJSON = New aspJSON 'Load JSON string oJSON.loadJSON(config) 'Path Dim url url = Request.ServerVariables("URL") url = Right(url, len(url) - 1) If Right(url, 1) = "/" Then uri = Left(url, Len(url) - 1) Else uri = url End If uri = Replace(uri, "\?.*$", "") path = "'" & Replace(uri, "/", "','") & "'" 'Keywords IF strPageKeywords <> "" Then keyword = strPageKeywords keywordText = "'" & Replace(keyword, ",", "','") & "'" Else keyword = oJSON.data("keywords") keywordText = "'" & Replace(keyword, "|", "','") & "'" End If 'Taxonomy taxonomy = Replace(oJSON.data("taxonomy"), "B2B_", "") taxonomy = LCase(Replace(taxonomy,"_"," ")) taxonomyText = "'" & Replace(taxonomy, "|", "','") & "'" taxonomyWTText = Replace(taxonomy, "|", ",") 'Page type dim fs set fs=Server.CreateObject("Scripting.FileSystemObject") filename = fs.getfilename(Request.ServerVariables("URL")) If filename = "index.shtml" OR filename = "default.asp" Then pageType = "index" Else pageType = "other" End If %> <% 'Dim url 'url = Request.ServerVariables("URL") 'Response.Write "" %> >
  When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
ASPFAQs.com
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sections:
Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Security
Stump the SQL Guru!
XML Info
Information:
Feedback
Author an Article
<% '
'
' mainShowQUADBanner("125x125-1") '
'
'mainShowQUADBanner("120x60-1") '
'
' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' '
' Dim jmp1intCpLooper ' For jmp1intCpLooper = 1 to 14 'Response.Write "  " ' mainShowQUADBanner("cp" & jmp1intCpLooper) ' Response.Write "
" ' Next ' jmp1intCpLooper '
' mainShowQUADBanner("commerce_bar") '
'
'
'
%>
ASP ASP.NET ASP FAQs Message Board Feedback
<% If main_blnASPMB Then %> <% If LCase(Request.ServerVariables("URL")) = "/default.asp" Then %>
More ASP Resources

Reference:
-- ASPFAQs.com
-- VBScript Reference
-- JScript Reference
-- SQL Books Online
-- Official Docs
-- Commonly Asked Messageboard Questions

Resources:
-- Recent ASP Articles
-- ASP.NET Information
-- 4Guys ASP F.A.Q.
-- ASPFAQs.com
-- ASP Internet Resource
-- ASP.NET Internet Resource
-- ASP Coding Tips
-- Newsletter
-- Related Web Technologies
-- User Tips!!
-- ASP-related ListServs

Information:
-- Advertise
-- Author an Article
-- Feedback
-- ASP Messageboard F.A.Q.

Windows Technology
Check out these Web sites for articles, tutorials, FAQs, and code on ASP and related technologies!
-- 15Seconds.com
-- ASP101.com
-- ASPFAQs.com
-- ASPMessageboard.com
-- ASPWire.com

[Complete List of Sites]

<% End If %> <% If LCase(Request.ServerVariables("URL")) = "/default.asp" Then %> The 4 Guys Present: The ASP Message Board <% Else %>
The 4 Guys Present: The ASP Message Board
To post in forums you must have an account - Create one now!
Customize the Forum Display | Change Your Password | Forgot your Username/Password? | Post Count! <% if Len(Session("LoginName")) > 0 then %> | Logout <% end if %>
<% End If %> <% ElseIf main_blnASPFAQS Then %> <% If LCase(Request.ServerVariables("URL")) = "/aspfaqs/default.asp" Then %>
ASPFAQs Resources
  -ASPFAQ Index
  -Recently Added FAQs
  -Most Popular FAQs
  -Application Object FAQs (3)
  -Arrays FAQs (15)
  -ASP.NET FAQs (12)
  -Cookies FAQs (4)
  -Databases, Errors FAQs (9)
  -Databases, General FAQs (20)
  -Databases, Queries FAQs (13)
  -Dates and Times FAQs (9)
  -Email FAQs (10)
  -FileSystemObject FAQs (19)
  -Forms FAQs (6)
  -Functions and Subroutines FAQs (4)
  -Getting Started FAQs (3)
  -Math Functions FAQs (3)
  -Networking FAQs (3)
  -Regular Expressions FAQs (6)
  -Security FAQs (3)
  -Session Object FAQs (6)
  -Strings FAQs (15)
  -System.IO Namespace Classes FAQs (8)
  -The Nature of Things FAQs (18)
  -Uploading FAQs (3)
  -XML FAQs (7)
  -Search ASPFAQs.com
<% End If %>

The 4 Guys Present: ASPFAQs.com

Jump to a FAQ
Enter FAQ #:
..or see our 10 Most Viewed FAQs.
<% Else %> <% If LCase(Request.ServerVariables("URL")) = "/index.shtml" Then %>
Windows Technology
Check out these Web sites for articles, tutorials, FAQs, and code on ASP and related Technologies!
VBForums.com
Developer.com
ASPFAQs.com
ASPMessageboard.com
DevX.com
CodeGuru.com
<% ElseIf InStr(1, Request.ServerVariables("URL"), "/webtech/") > 0 Then %> ">Print this page. <% If Len(strPageDate) > 0 And IsDate(strPageDate) Then Response.Write("
Published: " & FormatDateTime(strPageDate, 1) & "

") End If Response.Write("
") End If %> <% End If %>



<% If main_blnASPFAQS Then %>

Do you have a FAQ you'd like to suggest? Suggestions? Comments? If so, send it in! Also, if you'd like to be a FAQ Admin (creating/editing FAQs), let me know! If you are looking for other FAQs, be sure to check out the 4Guys FAQ and Commonly Asked Messageboard Questions!

Most Viewed FAQs:

1.) How can I format numbers and date/times using ASP.NET? For example, I want to format a number as a currency. (761643 views)
2.) I am using Access and getting a 80004005 error (or a [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)' error) when trying to open a connection! How can I fix this problem? (207777 views)
3.) How can I convert a Recordset into an array? Also, how can I convert an array into a Recordset? (202549 views)
4.) How can I quickly sort a VBScript array? (196039 views)
5.) How can I find out if a record already exists in a database? If it doesn't, I want to add it. (156019 views)
6.) How do I display data on a web page using arrays instead of Do...While...MoveNext...???... (152331 views)
7.) When I get a list of all files in a directory via the FileSystemObject, they aren't ordered in any reasonable way. How can I sort the files by name? Or by size? Or by date created? Or... (140381 views)
8.) For session variables to work, must the Web visitor have cookies enabled? (110162 views)
9.) Can I send emails without using CDONTS? (107083 views)
10.) How can I take the result of a SELECT...MULTIPLE or a group of same-named checkboxes and turn it into a query? That is, if the user selects 3 answers, how can I construct a query that looks for all 3? (106308 views)
Last computed at 9/17/2007 3:22:00 AM

<% End If If InStr(1, Request.ServerVariables("URL"), "/webtech/") > 0 Then Response.Write("
") End If %>


ASP.NET [1.x] [2.0] | ASPFAQs.com | Advertise | Feedback | Author an Article

<% If InStr(1, Request.ServerVariables("URL"), "Default.asp") =-1 AND InStr(1, Request.ServerVariables("URL"), "Default.aspx") =-1 AND InStr(1, Request.ServerVariables("URL"), "index.shtml") =-1 AND InStr(1, Request.ServerVariables("URL"), "index.html") =-1 AND InStr(1, Request.ServerVariables("URL"), "index_asp.shtml") =-1 Then %> <% End If %>