C
Chris Davoli
I'm trying to change content type of an ASPX page in the
browser and send some data so the browser mimics an EXCEL
spreadsheet (changed the content type to excel for the
ASPX page), but its getting the data from a previous page.
I'm doing a server transfer from a previous page. I've
also tried to flush the buffer at the page load before I
do anything, but this doesn't work. Below is my code. I'd
appreciate anyone who could lead me to a Q article on how
to do this in .NET. I've done this in classic ASP, but
not .NET.
Thanks
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not IsPostBack Then
Response.ClearContent()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-
excel"
'''''''''''''''''''''''''''''''''''''''
'''''''''''''
dvwEntityTypeProperties = New
DataView(dtblEntityTypeProperties)
dvwEntityTypeProperties.Sort = "Name"
Dim aCnt As Integer =
dvwEntityTypeProperties.Count
drgEntityTypeProperties.DataSource =
dvwEntityTypeProperties
y = 0
For Each fr In findResults.Results
dvwEntityTypeProperties(y)
("RedCircle") = "RedCircle" & CType(y + 1, String)
y = y + 1
Next
drgEntityTypeProperties.DataBind()
'''''''''''''''''''''''''''''''''''''''
'''
End If
Catch myException As SoapException
Debug.Assert(False, "Error occurred while
attempting to perform a FindNearby request: " +
myException.Message)
End Try
End If
End Sub
browser and send some data so the browser mimics an EXCEL
spreadsheet (changed the content type to excel for the
ASPX page), but its getting the data from a previous page.
I'm doing a server transfer from a previous page. I've
also tried to flush the buffer at the page load before I
do anything, but this doesn't work. Below is my code. I'd
appreciate anyone who could lead me to a Q article on how
to do this in .NET. I've done this in classic ASP, but
not .NET.
Thanks
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not IsPostBack Then
Response.ClearContent()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-
excel"
'''''''''''''''''''''''''''''''''''''''
'''''''''''''
dvwEntityTypeProperties = New
DataView(dtblEntityTypeProperties)
dvwEntityTypeProperties.Sort = "Name"
Dim aCnt As Integer =
dvwEntityTypeProperties.Count
drgEntityTypeProperties.DataSource =
dvwEntityTypeProperties
y = 0
For Each fr In findResults.Results
dvwEntityTypeProperties(y)
("RedCircle") = "RedCircle" & CType(y + 1, String)
y = y + 1
Next
drgEntityTypeProperties.DataBind()
'''''''''''''''''''''''''''''''''''''''
'''
End If
Catch myException As SoapException
Debug.Assert(False, "Error occurred while
attempting to perform a FindNearby request: " +
myException.Message)
End Try
End If
End Sub