473,385 Members | 1,487 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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>
Jul 19 '05 #1
6 1887

"Mark Sargent" <do*********@hotmail.com> wrote in message
news:u5**************@tk2msftngp13.phx.gbl...
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.


Are you getting an error? What are you trying to do that's not happening?
The code you posted had "if this then response.write that end if" in various
places. So, what's the issue?

Ray at work
Jul 19 '05 #2
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...
Jul 19 '05 #3
Okay

"Mark Sargent" <do*********@hotmail.com> wrote in message
news:ua**************@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...

Jul 19 '05 #4
ooops, drunk or not drunk, excuse my colorful language...be back
tomorow....cheers...

Mark, still drunk, Sargent,...
Jul 19 '05 #5
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.
Jul 19 '05 #6
figured it out..just had to put the <tr> tags before the <%> tags..cheers..

Mark Sargent.
Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: TinyTim | last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side code and you're going to return a customized HTML form with several fields and labels, you have to do an extensive amount of...
9
by: Rick Cook | last post by:
I would like to do a response form on one of my sites instead of posting an e-mail address for spammers. I've taken a couple of examples from sites, but the code looks clunky and non-conformant to...
3
by: Keith | last post by:
I am writing a web service that sends work to a system that gets it's work via XML files. This system looks for files in a particular directory, processes the file, then leaves a response file in...
1
by: Brian | last post by:
I'm trying to execute a DTS package through an ASP.Net web page. I want it to output the successful completion of each step. I have pasted my code below. It executes and output what I want, but...
8
by: Scott C. Reynolds | last post by:
I want to serve a PDF right to a web page (cannot link browser directly to PDF file). Stumbled across Response.WriteFile this morning. On my machine (XP Pro) this worked fine: private void...
4
by: cbtechlists | last post by:
I have an ASP app that we've moved from a Windows 2000 to a Windows 2003 server (sql server 2000 to sql server 2005). The job runs fine on the old servers. Part of the app takes a recordset and...
3
by: darrel | last post by:
I'm creating an RSS feed based off of this tutorial: http://www.uberasp.net/ArticlePrint.aspx?id=17 In a nutshell, they are doing: Response.Clear() Response.ContentType = "text/xml"...
1
by: Thomas | last post by:
Does anyone have a best practices recommendation on writing a valid XML document based on a 3rd party XML schema? I have a working solution but I would like to know if anyone has a better...
118
by: Chuck Cheeze | last post by:
This might be in the wrong group, but... Here is an example of my data: entry_id cat_id 1 20 2 25 3 30 4 25 5 35
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.