B
Ben
Hello,
I have an asp routine to display an Excel worksheet on an
a web (asp) page. I have created aspx pages but only in
the classroom. Point - I have the basics for aspx. Could
someone show me how I would perform the routine below (asp
routine) in aspx? I have VS 2003. Is there a control I
would use instead of the adoStream, or stick with
adoStream?
<%
If Session("LoggedIn") = True Then
Session("LoggedIn") = False
Response.ContentType ="application/vnd.ms-excel"
Path = "C:\MyFiles\MyExcel.xls"
Set adoStream = Server.CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(Path)
Response.BinaryWrite adoStream.Read()
adoStream.Close: Set adoStream = Nothing
Response.End
Else
response.redirect("FirstPage.asp")
End If
%>
Thanks,
Ben
I have an asp routine to display an Excel worksheet on an
a web (asp) page. I have created aspx pages but only in
the classroom. Point - I have the basics for aspx. Could
someone show me how I would perform the routine below (asp
routine) in aspx? I have VS 2003. Is there a control I
would use instead of the adoStream, or stick with
adoStream?
<%
If Session("LoggedIn") = True Then
Session("LoggedIn") = False
Response.ContentType ="application/vnd.ms-excel"
Path = "C:\MyFiles\MyExcel.xls"
Set adoStream = Server.CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(Path)
Response.BinaryWrite adoStream.Read()
adoStream.Close: Set adoStream = Nothing
Response.End
Else
response.redirect("FirstPage.asp")
End If
%>
Thanks,
Ben