Converting Spaces In Filenames To "%20"

I'm writing a shopping cart system, and the item listings have thumbnails along the left side, kind-of like the layout of eBay. This works fine and dandy unless the filename happens to have a space in it. When there's a space, the Url ends where the space is. I tried using the replace function, but to no avail. I tried ItemPic=(replace(ItemPic," ","%20")

However, the filename then becomes something like Cool%2520Item.jpg instead of Cool%20Item like it needs to be. If anyone has a solution other than going through about 10000 pictures and renaming the ones with spaces on how to make this work. Code:

View Replies


ADVERTISEMENT

Get All Filenames From A Directory?

Is it possible to read the all filenames from a directory? Basically I want to grab all the filenames from a directory and make a flat file with all the values in it.

View Replies View Related

Concatenate Filenames

I am developing a school Intranet and have an ASP page that allows students to upload files to the server for marking by teachers.

Unfortunately students often do not identify themselves correctly in the work they submit, so I am trying to find code that changes the name of the file they upload, by adding the their login name. (the the server variable AUTH_USER.)

AUTH_USER is easy to get but to perform the concatenation has me stumped.

View Replies View Related

Seperating Filenames

I'm using the input File method for users to upload their files to a folder on a website, I wanted to store the filename in the database but the information that is produced from the input File is an absolute path to the file on the users system (ie. c:/usersfolder/usersfile.doc)

where as I only want the filename (usersfile.doc). I am presuming that this is going to be a Split method but is there a decent place to find a tutorial on this. I've had a good google but can't seem to find anything.

View Replies View Related

Use FSO To Copy Filenames To A DB?

I must have about 300 images I intend to manually type into a database. Aaaaargh! I was hoping someone might be able to give me a script that if I were to place all the files on a server, I could access the directory, and loop through each of the files, storing the name in a field... Can it be done?

View Replies View Related

Reading Filenames In A Folder

I would like to read the contents of folder and display filtered results in my page.

View Replies View Related

ASPUpload. Write Indivdual Filenames To DB

I've used asp upload before to upload single files to my server and write the name of the file to a database. I'm now trying to upload two files and write each file name to a different field in a record.

Currently my code says: ....

View Replies View Related

Sort Filenames With Download Links By Date - Multidimensional Array ??

i use this script to generate download links from directories which are first passed to an script to record the number a link is clicked.

the function is calle with a path like:
ListFolderContents(Server.MapPath("/dir1"))

my question now is: can i write this to an multidimensional array (or object oriented?) - and then sort it by date ?? if so how ? Code:

View Replies View Related

Spaces

how can I add a space between words in my formtomail script. i know that by putting & VbCrLf & it adds a line break but I need to be able to add a space.

View Replies View Related

Spaces

i m using a simple form to cleect user info and i need to chech if the user left any spaces befor or between words and delete it for ex if the user pressed enter many times before typing the data in the text area.

it makes errors in my db so how can i check if there is spaces in the textarea ot text box and delete it?

View Replies View Related

Spaces

I have a problem with the following code :

Response.write rstContacts(1).Value

The above line prints "Andark Marine"

However the following only passes "Andark" and stops at
the space. How do I get over this ? Its the same with all
records.

Response.Write("<td align=center><a
ref=companycontacts.asp?Company=" & rstContacts(1).Value
& " target=_new><img src=imagescontact.ico width=25
height=25 border=0></a></td>")

View Replies View Related

Spaces In Data

I seem to have now been able to get ASP to write the full contents of a field with spaces in it by using:

Var_Myname = "'"&rs.fields("User_Name")&"'"

<input name="txtFname" type="text" size="25" maxlength="25" VALUE=<% = VAR_UFname %>>

that works fine but when I just do a simple Response.write(Var_Myname) I end up with something like:

'James'

I don't want these quotes, so the question is can I either correct the Response.write (don't really want to do that each time.or is there a way to ge the text boxes to do their bloody job propper.

View Replies View Related

Removing Spaces

how do i remove spaces in the middle of the string?

from this:
var = "sand bag"

to this:
new var = "sandbag"

View Replies View Related

Spaces In Folder Name

I use breadcrumbs for navigation
I have a folder called College Students in WWWRoot
in college students i have a page called mainpage.shtml
when i open the page like this
www.abc.com/college students/mainpage.shtml
i see the breadcrumbs like this
Home >> College%20Students >> Students List
but i want to see it like this
Home >>College Students >> Students List
Students List is the title of the page
Can someone tell me how to get rid of those %20 that i see when i have spaces in my folder name

View Replies View Related

ASP/Checkboxes And Spaces

I have the following in one of my asp pages:

....
Response.Write("<form action=createpst.asp method=post>" )
Response.Write("<input type=checkbox name=pstfldr value=" & myArray(i) & ">")
Response.Write("<a href = '" & strLink & "'>" & myArray(i) & "</a>" & "<br>")
Next
Response.Write("<br>" & "<input type=submit value=submit>" & "</form>")
%>

In my createpst.asp page I am trying to load in an array using the split function:

<%
Dim arrVals
arrVals = split(Request.Form ("pstfldr"), ",")
Dim i
For i=0 to UBound(arrVals)
Response.Write arrVals(i) & "<br>"
Next
%>

However, the problem is that some of my values that are read in from myArray(i) in the first asp page can be more than one word. So, when I get to my second asp page and traverse through the loop, some of the values stored that contain more than one word only output the first word.

View Replies View Related

Spaces Carrying Over

Even when I try using LTrim function, I have one variable that has two
mysterious spaces in front of it when i pass it to the next page in a
query string

<a
href="timestar-nevada-salesview.asp?resortname=<%=rstime("resortname")%>
&resortstate=<%=rstime("resortstate")

the resortname variable gets two spaces thrown in front of it for some
reason.

View Replies View Related

Handling Spaces With Sql/asp In A Url

I have written some code to query a database and create a hyperlink based on a value, however, if the value comprises of more than one word, the hyperlink only references the first part of the value. e.g. For instance, if the value retrieved is "the strokes", the hyperlink will only contain the word "the".

Here is my code: ....

View Replies View Related

Spaces Between Words

the spaces between the words (in a textbox for example) are removed when i try to pass the value to another page for saving.

View Replies View Related

+ Sign Where The Spaces

I have the following:

<%=rs1("Address")%>

which would show something like:
555 Home Rd

What can I add that will put a + sign where the spaces are so that it looks like:
555+Home+Rd

View Replies View Related

Spaces In Recordset??

Below this code causes and error because there are spaces within the "". I can't change the name of the field, so I need to find out if there is away round this?

<% = objRS3("Job Ref No")%>

View Replies View Related

Spaces In A Username

we never guarded againsts spaces in a new site we built. And while checking, a couple of users registered with spaces between their usernames. e.g. afrika 1 instead of afrika_1. Could there be downside to this?

View Replies View Related

Spaces In Formtomail Script

Just a quick one, how can I add a space between words in my formtomail script. i know that by putting & VbCrLf& it adds a line break but I need to be able to add a space.

View Replies View Related

Spaces In Column Names

I have a db auto uploaded to me everyday. I am displaying information from the db, but some of the columns contain spaces. When I use a space in a select statement it obviously does not work. Is there some special syntax I need to allow for a column name that contains a space?

View Replies View Related

Download Filename With Spaces

I found this code on the net that will prompt a user to select open or save the file. If you run it, it will just prompt to download "whatever.doc".

The problem that puzzle me is when my filename have spaces e.g. "this file.doc", the code will replace "_" to the spaces. i.e "this_file.doc"

How do i maintain the actual filename? Code:

View Replies View Related

Showing All Spaces Without Using The &nbsp;

I am using ASP to read code from a text file that I am displaying on my
page. Because I do not want the code from the text file to be executed, I
used the Server.HTMLEncode() method to display it as it is in the file.
However, the spaces used to indent lines is still removed by the browser.

I
cannot use VBScript's replace function to replace all spaces with &nbsp;
because that would replace all spaces, including ones that I do not want
replaced as well as majorly increasing the size of my file. Is there any
way to display the spaces used to indent the lines without manually writing
a function to do it?

View Replies View Related

Passing A String That Has Spaces

I have a View button that shows a database record of entries. At the end it has a delete link for each entry. When u click it, it passes the Address(like a house address) to a script that searchs the DB for the matching address.

The only problem is most address have spaces. I read somewhere about double quotes, or using single quotes or some combination, I don't remember.

View Replies View Related

Spaces Before The Description Line

How to keep the spaces before the description line in the following code? Right now, it displays like "Net Income", but I like to have spaces before the words like " Net Income". The database value is " Net Income".

<td align="right"><Font class=content4><%=ars.Fields("LINES")%></td> ...

View Replies View Related

Spaces Replaced With %20 In Firefox

y spaces are replaced in to %20 in firefox. The resulting text when viewed becomes unreadable junk like this

The%20resulting%20text%20when%20viewed%20becomes%20unreadable%20junk%20like%20 this.

View Replies View Related

Tables Containing Colums With Spaces In The Name?

I am running a select statement against a table that has several columns with the name:

like
OS Name
and
OS Type

How do I do my SQL select statement and deal with the space in the column name? Thus far I have tried putting "OS Name".. which has genterated an error Then I tried 'OS Name' which did NOT spin out an error but did not return any data either.

View Replies View Related

Writing Cookies From ASP With Spaces And Hyphens

I have an ASP (3.0, not .NET) app that writes cookies with hyphens and
spaces in the names and values. If I had the control over the apps that will
be looking for these cookies, I would eliminate the special characters, but
as it is, I do not have that luxury.

When I write the cookies, they seem okay in IE, but in Firefox, they are
strange. For example, the cookie name is US-NONUS, but in Firefox it looks
like US%2DNONUS. For a value of NEW HAMPSHIRE it comes out in Firefox as
NEW+HAMPSHIRE.

Please note that these strings are not created in any special way: They are
hard-coded into the ASP, with no encoding or anything like that.

View Replies View Related

Random Spaces In My Asp Generated Emails?

I have some ASP pages that use ASPmail to generate emails containing infomation taken from an Access database (the info is selected from a random record, in a particular database field, and then inserted in the email text as a variable). When the emails arrive at their destination, they contain a random space. The position of the space is completely random. It can appear in the ordinary body text, or in the lines of text generated by displaying the contents of the aforementioned variables.

eg the line in the email may say:-

I am a line in an em ail.

or

I am another li ne in an email.

or

I am yet ano ther line in an email.

Sometimes the space appears in a hyperlink and causes it to fail.....

View Replies View Related

Ignore Blank Spaces For Drop Down ASP

i am currently working on code that searches an excel spreadsheet and displays results. Below is the code for the drop down. I was wondering is there a way to modify this to ignore blanks as when i use the drop down, it contains the blank cell spaces Code:

View Replies View Related

Creating Spaces With Response.Write

I am running a query which basically finds the next record when comparing the date of it with the current date. Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved