space with file name is giving problem


Hi ,
I am new to ASP and VB Script.

I am trying to open Exel file and Csv file from the website, my code is as follows.

Response.Buffer = TRUE
Response.Clear
'Response.AddHeader "Content-Disposition","inline;filename=" & sFile
Response.AddHeader "Content-Disposition","inline;filename=" & sFile
If Not GetReportOutputType.EOF And Not GetReportOutputType.BOF Then
Response.ContentType = GetReportOutputType.Fields.Item("MimeType").Value
End If
Response.BinaryWrite( Data )
Response.End
Set FileReader = Nothing
else
Response.Redirect("ReportViewErrorMsg.aspMode=FileNotFound")
End If
filetxt.Close



if sFile name contains white space (test file.xls), the file openining with some error. Error contains some session variable.

please help me out.
Posted On: Saturday 20th of October 2012 01:00:31 AM Total Views:  282
View Complete with Replies

RELATED TOPICS OF ASP PROGRAMMING LANGUAGE




Removing spaces between string

I need help to remove spaces between the string.\tI used the Trim() function this remove the leading and trailing spaces.\tI need to remove something in between.\tAre there anyway that you can remove the spaces between the string.
VIEWS ON THIS POST

224

Posted on:

Monday 22nd October 2012
View Replies!

SQL Server Webspace

Does anyone know if its possible to develop for, and administrate an MS SQL Server database supplied by a webspace provider as part of their host plan, WITHOUT owning a copy of MS SQL ServerThe ones I've checked out require Enterprise Manager which is only available as part of SQL Server software (as far as I know)'ppreciate any help!
VIEWS ON THIS POST

76

Posted on:

Tuesday 23rd October 2012
View Replies!

What is better; Saving processing power or saving disk space?

In our posts, we see the # of posts with every users' avatar. So should this number (# of posts) be saved in a field or be calculated/counted while displaying I think counting is better since to keep this number in field will not only occupy disk space (since we have to use int datatype) but also other resources when we'll update every time a user uploads a post. Am I right CB
VIEWS ON THIS POST

265

Posted on:

Friday 26th October 2012
View Replies!

Extra space randomly inserted when using datalist control..Why?

I have a user control that has a datasource and a datalist populated by that datasource. The datalist shows an image and then details below. My problem is that for some of the items, there is extra whitespace inserted above the images. Some items are perfect and others have this extra whitespace, which throws the layout off. See attached screenshot.
VIEWS ON THIS POST

355

Posted on:

Friday 26th October 2012
View Replies!

Not recognising spaces;

Writing a link with spaces into the database is fine, but when I use the following code to display that link it stops at first space within the link (they are links to maps from multimap.co.uk and not really sure why they have spaces in their links but they do) Code: Response.Write "Location" Response.Write "" Response.Write "" Not sure if its something in the database I need to do or in my code when displaying the records or when writing them into the database.... Liam
VIEWS ON THIS POST

141

Posted on:

Friday 26th October 2012
View Replies!

Password should not contain a blank space

In my site I have give the user a option to change his password. I dont want to the user to use blankspace in the password, so how do i check if the password contains a blank space before updating it to the database Eagerly Looking forward for some solutions Thanking You Shriram
VIEWS ON THIS POST

186

Posted on:

Friday 26th October 2012
View Replies!

spacer

how do you use the spacer html, i want to move some text over a bit
VIEWS ON THIS POST

118

Posted on:

Friday 26th October 2012
View Replies!

Open Connections with ASP causing no buffer space??

My IIS server keeps getting to a point where we get this error: java.net.SocketException: No buffer space available (maximum connections reached): JVM_Bind. Is this from creating open ASP connections and not propertly closing them If so, what should I be looking for in the code for open/closed connections
VIEWS ON THIS POST

227

Posted on:

Friday 26th October 2012
View Replies!

Uppercase after each space

I'd like to know how can I make the first letter of every word on a textbox field, uppercase, automatically. I'd like to use this for the Name and Surname field, but I don't know how... any hint
VIEWS ON THIS POST

149

Posted on:

Friday 26th October 2012
View Replies!

question about replacing blank spaces

Is there a way to format a string such as "How are you" to "How,are,you" I tried using the replace syntax: Code: abc = "how are you" abc = trim(abc) abc = replace(abc, " ", ",") response.write(abc) but this still outputs "how,,,,,are,,,you" how can I have just one comma between each word
VIEWS ON THIS POST

238

Posted on:

Friday 26th October 2012
View Replies!

How do you include a querystring that has spaces in it?

I'm using a variable in a querystring and some of the variables have spaces in them. When the link is displayed it's giving me the url up to the point of the first space. Is there anyway to include the spaces It works for me fine on other pages.
VIEWS ON THIS POST

233

Posted on:

Friday 26th October 2012
View Replies!

ASP table align and space keeps changing

hello all I am displaying the recordset results in a table in a browser using asp. If there is nothing in the table the table is aligned at top... The number of rows and columns in the table is dynamic based on the records from the database recordest But as the number of rows in the table increase the space above the table increases. Any tags in table by which i can restrict any spaces around the table.
VIEWS ON THIS POST

212

Posted on:

Friday 26th October 2012
View Replies!

read whole string including space from combo box values

I have a combo box bulit by taking in values from database.. some of the values have spaces in between them e.g President's Office So when i use this code to read Response.write(Request.Form("place")) Its only returns me President's HOw can make it include whole string including spaces.. Please do help....Thanx a lot.. President
VIEWS ON THIS POST

330

Posted on:

Friday 26th October 2012
View Replies!

Replacing blank spaces in link

I'm trying to link customer address that are in a db - but Map Quest doens't allow blanks in the link and need to replace those blanks with + signs - can anyone help I need it to replace 1234 Hillside with 1234+Hillside script sample
VIEWS ON THIS POST

298

Posted on:

Friday 26th October 2012
View Replies!

Problems with blank spaces

. I'm trying to delete ' from strings that i'm going to use in a SQL query. I have this now: function RemoveChars(input) input = Replace(input,"'","") End Function The thing is, all the ' will turn into blanks(spaces) and I need to get rid of them as well, so i tried this: function RemoveChars(input) input = Replace(input,"'","") inout = Trim(input) End Function But it didn't work. Any suggestions Also, should I have a: Response.Write input in the bottom before End function When should I add that string
VIEWS ON THIS POST

244

Posted on:

Friday 26th October 2012
View Replies!

post code regexp with no space

Some one has kindly supplyed me with this regexp to check all UK post codes: /^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z])))) [0-9][A-Za-z]{2})$/ The trouble is it looks for a space in the middle and i DONT want a space. I can't see the bit that does this - any help cheers monkey
VIEWS ON THIS POST

409

Posted on:

Friday 26th October 2012
View Replies!