Ask a Question related to ASP, Design and Development.
-
Mark Sargent #1
Response.Writing Rows based on If Staments
Hi All,
been away from developing, if you can call what I do that, and am stumped
already..lol..see code below. I'm trying to get each row to display, based
on the if statements. Hope you can help me here. Cheers.
P.S. ? will appear in place of Japanese characters. Thanx for your
understanding.
Mark Sargent.
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/Classifieds/UploadScript.asp, line 63
<td>File Type Error</td>
.................................................. .........................
Error code is identified here
.................................................. .........................
<table align="center" bgcolor="#00FF00">
<tr>
<td width="55%">
<p align="center"><br>
<%
Dim strPath
strPath = "/Classifieds/ImageUploads"
Set Upload = Server.CreateObject("Persits.Upload")
Upload.OverwriteFiles = False
Count = Upload.SaveVirtual(strPath)
If Err <> 0 Then
Response.write ("Err.Description")
End if
For Each File in Upload.Files
If File.ImageType <> "JPG" Then
WrongFileType = "????.jpeg??????????????????????????????"
File.Delete
End If
If File.Size > 50000 Then
FileTooBig = "????????????50000??????????(" &File.Size&"bytes).
?????????????????????????????."
File.Delete
End If
Next
Dim ImageWidth
Dim ImageHeight
Dim FilePath
For Each File in Upload.Files
FilePath = File.Path
ImageWidth = File.ImageWidth
ImageHeight = File.ImageHeight
Next
FilePath = replace(FilePath, "\", "/")
FilePath = replace(FilePath, "RemovedForSecurity", "")
%>
</td>
</tr>
<tr> <%If WrongFileType <> "" Then
.................................................. ...........................
.................................................. ...........................
.................................................. ........
<td>File Type Error</td>
.................................................. ...........................
.................................................. ...........................
.................................................. .........
<td>Response.Write WrongFileType &"<br>" %>
<a href="ClassifiedUploadImage.asp"><font color="#000000"><b>Try
Again</b></font></a>
<td width="55%"></td>
<%
ElseIf FileTooBig <> "" Then
<td>File Too Big</td>
<td>Response.Write "<font face=""MS P????, MS P??, MS UI Gothic,
MS ????, MS ??"">" &FileTooBig &"</font><br>"%>
<a href="ClassifiedUploadImage.asp"><font color="#000000"><b>Try
Again</b></font></a>
<td width="45%"></td>
</tr>
<%
Else
For Each File in Upload.Files
<tr>
<td>File Name</td>
<td> Response.Write File.FileName & "(" & File.Size & "bytes)
uploaded to easyboarder. <BR>"</td></tr>
Next
<tr>
<td>Image Width</td>
<td>Response.Write "Image Width:"&ImageWidth &"<br>"</td>
<tr>
<td>Image Height</td>
<td>Response.Write "Image Height:"&ImageHeight &"<br>"%>
<td width="55%"></td>
<tr>
<td width="55%"> <font color="#FFFFFF" size="2" face="MS P????, MS P??,
MS UI Gothic, MS ????, MS ??"><b>????????????????????????????????</b></font>
<td width="45%"><font color="#FFFFFF" size="2" face="MS P????, MS P??,
MS UI Gothic, MS ????, MS ??"><b><a
href="ClassifiedImageResize.asp?FilePath=<%=FilePa th%>"><font
color="#000000"><b>Resize
Image</b></font></a></b></font>
<p align="center"><font color="#FFFFFF" size="2" face="MS P????, MS
P??, MS UI Gothic, MS ????, MS ??"><b>
</b></font>
<p align="center">
<p align="center"></td>
<form name="form2" method="post" action="ClassifiedNewDetails.asp">
<input type="submit" name="Submit" value="Continue">
<br>
<input type="hidden" name="FilePath" value="<%= FilePath%>">
<br>
<input type="hidden" name="hiddenField2" value="<%=
Session("MM_Username")%>">
<%
End If
%>
</form>
</tr>
</table>
Mark Sargent Guest
-
HTTP 1.1 based request / response
How to send / receive HTTP 1.1 based request / response to create a persistent connection with web server (Jsp in Tomcat)? -
selecting based on matches on multiple rows?
I thought this would be simple, but it has me stumped. I've got items that have attributes. Attributes are of the form "name=value", where "name"... -
rows in a datagrid in bold based on the value of a field
How can I make some rows (of a datagrid) in bold based on the value of a field? for instance if that field is "1" row should be in bold ,otherwise... -
writing db record to tables (wrapping and spanning rows)
Hi, I have a dataset where each record contains a persons name and filename of their picture. I want to write a row of five names, then a row... -
HELP: writing a file to response buffer --> IE shows wrong filename
Hi In an .aspx codebehind file I retrieve a file from a database and write it to the response buffer, so the browser pops up a 'save file' dialog... -
Ray at #2
Re: Response.Writing Rows based on If Staments
"Mark Sargent" <downdogWoof@hotmail.com> wrote in message
news:u5MKo2TmDHA.3312@tk2msftngp13.phx.gbl...Are you getting an error? What are you trying to do that's not happening?> Hi All,
>
> been away from developing, if you can call what I do that, and am stumped
> already..lol..see code below. I'm trying to get each row to display, based
> on the if statements. Hope you can help me here. Cheers.
>
The code you posted had "if this then response.write that end if" in various
places. So, what's the issue?
Ray at work
Ray at Guest
-
Mark Sargent #3
Re: Response.Writing Rows based on If Staments
dunno..pretty drunk at the mo..perhaps I'm the problem...lol...thought I
posted the actual error...shit, perhaps I need another cold one,
eh..cheers..
Mark, I'm pretty drunk, Sargent...
Mark Sargent Guest
-
Ray at #4
Re: Response.Writing Rows based on If Staments
Okay
"Mark Sargent" <downdogWoof@hotmail.com> wrote in message
news:uai4J2XmDHA.3700@TK2MSFTNGP11.phx.gbl...> dunno..pretty drunk at the mo..perhaps I'm the problem...lol...thought I
> posted the actual error...shit, perhaps I need another cold one,
> eh..cheers..
>
> Mark, I'm pretty drunk, Sargent...
>
>
Ray at Guest
-
Mark Sargent #5
Re: Response.Writing Rows based on If Staments
ooops, drunk or not drunk, excuse my colorful language...be back
tomorow....cheers...
Mark, still drunk, Sargent,...
Mark Sargent Guest
-
Mark Sargent #6
Re: Response.Writing Rows based on If Staments
okay, now that I'm sober..damn the Rugby World Cup...what I was attempting
to do, was, have a row appear when a condition was met, but, got the
following error,
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/Classifieds/UploadScript.asp, line 63
<td>File Type Error</td>
I don't understand it. Cheers.
Mark Sargent.
Mark Sargent Guest
-
Mark Sargent #7
Re: Response.Writing Rows based on If Staments
figured it out..just had to put the <tr> tags before the <%> tags..cheers..
Mark Sargent.
Mark Sargent Guest



Reply With Quote

