> > The page I am using works fine when just using hand entered values in
> > the page itself ie objMM.To = "some...@someplace.com"
[quoted text clipped - 41 lines]
>
> - Show quoted text -
I hopefully tried what was suggested and got the following error when
trying to process:
BC30471: Expression is not an array or a method, and cannot have an
argument list.
Line 15: for h = 0 to 13
Line 16:
Line 17: msg = msg & cartArray(h,i) & vbCrLf <---- problem line
Line 18:
Line 19: Next
code from page is:
<% @Import Namespace="System.Web.Mail" %>
<% @LANGUAGE="VBScript" Debug="true" %>
<%
dim i as integer
dim h as integer
dim cartMaxUsed as integer
dim cartArray as string
dim msg as string
cartMaxUsed = session("cartMaxUsed")
cartArray = session ("cartArray")
for i = 0 to cartMaxUsed
for h = 0 to 13
msg = msg & cartArray(h,i) & vbCrLf
Next
Next
'Create an instance of the MailMessage class
Dim objMM As MailMessage = New MailMessage()
and so forth with mail message settings.
cartMaxUsed is total number of items in cart
there are 14 field items I have collected for each cart item.
Thanks for the advice.
sean
Alexey Smirnov - 09 Sep 2007 13:34 GMT
> BC30471: Expression is not an array or a method, and cannot have an
> argument list.
It's because you declared a string and not an array:
dim cartArray as string
An array has to be declared as:
dim cartArray() as string
Declare multi-dimensional array by separating the dimensions with
commas:
dim cartArray(,) as string
Then you can use the ReDim statement to declare the size of the
array:
ReDim cartArray(13, cartMaxUsed)