Grid Hierarcical
Source code of a Control, subclassing the MSFlexGrid, to create a Hierarcical Grid (like Treeview). But, as in a MSFlexGrid, you can set individual fonts, colors, even pictures on any cell.
AI
AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Source Code
Upload
Upload
"COUNTER.ASP" / VBSCRIPT VERSION
<%
If IsEmpty(Session("count")) Then
Call Countthisuser
End if
'by Abhi Malani - http://www.duelcom.com/malani/
Sub CountThisUser()
Dim objFSO, objFS, file, intCount
file = Server.MapPath("hits.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(file) Then
Set objFS = objFSO.OpenTextFile(file, 1)
Else
Set objFS = objFSO.CreateTextFile(file, True)
End If
If Not objFS.AtEndOfStream Then
intCount = objFS.ReadAll
Else
intCount = 0
End If
objFS.Close
intCount = intCount + 1
Session("count")= intCount
Set objFS = objFSO.OpenTextFile(file, 2)
objFS.Write intCount
objFS.Close
Set objFSO = Nothing
Set objFS = Nothing
End Sub
'Session.Abandon 'for testing the code
%>
JSCRIPT VERSION/ "COUNTER.ASP"
<%@Language=Jscript%>
<%
//by Abhi Malani - http://www.duelcom.com/malani/
var count = Session("count");
if(count=="" || count==null || count=="undefined"){
countuser();
}
function countuser(){
var ForReading = 1, ForWriting = 2, TristateUseDefault = -2;
var file = "hits.txt";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var f = fso.GetFile(Server.Mappath(file));
var ts = f.OpenAsTextStream(ForReading, TristateUseDefault);
var count = ts.ReadAll();
count = parseInt(count);
count = ((isNaN(count)) ? 1 : count++);
ts.Close( );
ts = f.OpenAsTextStream(ForWriting, TristateUseDefault);
ts.Write(count);
ts.Close();
Session("count") = count;
}
//Session.Abandon //for testing the code
%>
Original Comments (3)
Recovered from Wayback Machine