How Browsers (IE) Understand File Types.

1) I have the following html code on the server:

<HTML>
....
.....
<BODY>

<A HREF = http://MyServer/MyDoc.doc> Click here to see the document</A>

When I click on the link How Internet Explorer understand that it's a Word
Document and It's necessary open it with Microsoft Word ? Is The extension
to give the necessary information to Internet Explorer ?
Where does IE look for the application to use to open the file on the server
? On the local registry ?

I have tried to rename Mydoc.doc in MyDoc.pdf and I have called

http://MyServer/MyDoc.pdf and the browser has opened Acrobat Reader but the
binary format is for Microsoft Word.

Does the Browser User an Http_Header sended automatically ? (for example
HTTP_FILE_NAME....IF IT EXISTS)

2)Now I have the following link:

http://MyServer/ReturnMyDoc.asp

It returns the binary data of MyDoc.doc file. Now I want to say to the
browser that the file is called MyDoc.doc (I don't want to use Content Type
= ms-application/msword) : is there a header to say this to Internet
Explorer ?

View Replies


ADVERTISEMENT

ASP File Upload - Limit File Types?

I would like to use this code on my website to allow simple file uploads from clients. I would like to restrict the file types they can upload. Code:

View Replies View Related

Cant Understand Code

i read the code but i dont understand it

rs.open strSQL,conn,adOpenDymanic,3

whats the adOpenDymanic?and whats the number 3?why not another number?

View Replies View Related

Understand Quotes Better

As I get further and further into ASP/VBscript I realize I just don't undertstand how to properly use single/double quotes at the same time. This is really holding me back. If anyone can help me understand this better or know some good articles I would appreciate it. My current problem is adding a logo to my page from the database. What quotes are needed inside my <img> tag. Code:

<img src="/teams/logos/"'"<% response.Write rs("Logo")%>"'"> .

View Replies View Related

Understand Global.asa And Conn String

I searched the forum but I am still a little confused regarding the global.asa file. I created a global.asa file and it is in the root of the virdual directory. I then created a sub to initially connect to a datase such as: Code:

View Replies View Related

Check Browsers

Is there any If statement to check browsers?I want to check IE6, IE7 and Firefox.

View Replies View Related

Internet Browsers

This problem occurs in classic ASP on a simple asp page I am writing.I am trying to output a random number using VBScript's Rnd() function.Whenever I refresh my browser, the same number appears(0.7055475).This happens in both Internet Explorer and Firefox. This is all I'm doing:

<%Response.Write(Rnd)%>

I have pressed F5 to refresh, cleared both browser caches,and even restarted IIS.I was under the impression that a psuedo-random number would at least change values when I refreshed my browser.Does anyone know what the deal is with Rnd() not producing different numbers?

View Replies View Related

Cookies And Browsers

I'm coding a shopping cart in asp. I store all info about ordered items, customer's coordonates, etc. into cookies. When the order is complete I use "CDONTS.NewMail" to send an order confirmation's email, where all items and details are listed for the customer. As to retreive all these info a code reads all info stored in the cookies. If a run my code under Firefox and Konqeror , all works well and the sent email contains all info.

So, I wrote a code to read all cookies on the page before opening the page that generates the email to the customer, then when tested, all the cookies and session variables can be read. Under i.e.,if the same code is run in the page generating the email, it returns empty session variables and some cookies are missing or are now empty or can't be read!If it is tested under Firefox and Konqeror all cookies and session variable are stil there.

View Replies View Related

Browsers Not Redirecting

I have been having problems with Gecko based browsers not redirecting properly.

This is the line of code that does the redirecting:

Response.Redirect ("Validation.asp?BookingNo=1234567")

The Gecko based browsers change this URL to read "Validation BookingNo=1234567" and of course they get a 404 Error as a result. The above code works on every other browser without fault. So why do Gecko based browsers have a problem. Is Gecko just nother work for this software.

View Replies View Related

Crashing Microsoft Browsers

Go to this page:

http://support.microsoft.com/defaul...kb;en-us;224979

And then use their second example the clientcap.htm and clientcap.asp section. Then fire up clientcap.asp and watch the Microsoft Internet Explorer browsers crash.

View Replies View Related

Session Variables With Two Browsers

we are using internet explorer 6, reading information from w2k iis asp. users
are opening two browsers so they can keep two sessions open with different
information. It is rare, but sometimes the the non-active browser will use
the session varibles from the active one. We have deleted local content and
cookies with no affect. any thoughts?

View Replies View Related

The Browsers' Back Button

I use the following code which simulates the browsers' back button. window.history.back(), but whenever i use this , i get a "404 page not found error . is this related to browser settings?

View Replies View Related

Sub-Types

I came across the following question at a website but unfortunately the answer wasn't accompanying it:


What are the special sub-types in VBScript?

What's the answer to the above question?

View Replies View Related

Types In ASP, Is It Possible?

I am writing a basic tournament submit site for a poker tournamen
group I am in. The situation is we want to use code to calculate wha
we owe other members at the end of the week. The way I figured to d
this is read from the database and store tournament numbers in an arra
then run a query for each tournament and cycle through the tournamen
data assigning the information where needed. I can not find if you ca
or how you can use a Typedef in ASP. Pretty much I want to create
type then make an array of that type. ie: Code:

View Replies View Related

Cursor Types

the cursor types and lock types while opening the recordset.

View Replies View Related

PWS And MIME Types

I'm running PWS on a Windows ME machine to do some WAP development. I need to set up some mime types so that PWS can deal with .wml .wbmp and .wmls WAP files.

I'm told this can be done by either via the Folder Options -> File Types from a Windows Explorer or by editing the registry. I've tried both of these but to no avail.

View Replies View Related

Data Types

does the data type varchar allow numbers and characters, or just one, also if this does not allow both numbers and characters what data type can i use to do this.

View Replies View Related

Types Of Users On My Forums

Assume I have three types of users.
Type I can only Read Posts.
Type II can Read and Edit. And
Type III can Read, Edit and Delete Posts.

Now to manage this, do I need to make three different users in my DB or should I just use ASP to determine that what permissions should every user have. For example, Type I users will not have the edit and delete button on thier screens and Type II users won't have delete button on their screens and Type three would have all three buttons.

Even if I make different users in my DB (assuming it's necessary for security), so how would I determine that what connection string should I connect a specific user with since we have to give the user name and password on the ADODB connection string?

View Replies View Related

Database Field Types

I pass a table name into my program dynamically. I could display the data by looping through the object.Fields for both the field name and the field data using object.GetRows.
What I have not figured out is if there is a way to figure out from the Fields what type of field (ie. Numeric, Text) it is.
Certainly I could check the actual data once it is read, but is there a way to figure out the field type without doing that? Perhaps an object property of a recordset that I am not familiar with?

View Replies View Related

Currency Data Types

Why am I only able to create 60 currency type fields in Access 2002 (Build 10.4302.6735) SP3?
If I try to create more than 60 Currency type fields, I will get an error that says, "Too Many Fields Defined. Errors were encountered during the save operation. Data types were not changed."
What if I need more currency type fields - like about 32 more? Do I need to create two separate related tables?

View Replies View Related

DATA TYPES Problems

i have a problem with the data types im using right now... because i set my data type to text ang number of characters allowd is 50, what happens is everytime i entered a data that is less than 50 characters and if i displayed it the remianing blank spaces that hasnt been cosumed is displayed.
anyone here got an idea how i can control this? is this a data type problem? i cant set my data type lesser.

View Replies View Related

Sorting Document Types

I'm currently using a document upload script and saving the filename to a database field as such: Code:

RS("Title") = Form("SourceFile").FileName

What I'm trying to do is evaluate that files type (ie. doc, xls, txt...) and fill in another database field with just the document type or a variable representing it. Is there a way to just strip off the last three letters of the form input and save that seperately?

View Replies View Related

Downloading Known Mime Types

I have a selection of MP3's on my website, (non-copyrighted of course), I have an asp page that list the directory of MP3's which then provides a link to another ASP page to force download the file.

<%
Response.AddHeader "content-disposition","attachment; filename=" & Request.QueryString("fname") & ""
%>

Up until the weekend just gone, this worked fine, but now it only downloads a 0 byte file.

Obviously my code hasn't changed, so has anyone any other ideas whats gone wrong or another way the force download of a known mime type can be acheived.

View Replies View Related

Querystring Data Types

I have a form with 3 submit buttons that uses Javascript to determine which of the three buttons were pressed, appends the appropriate querystring to the end of the action value of the form before submitting it. eg

if add was clicked then the action would be; process.asp?query=add

Inside process.asp I have a switch statement that should check the value of the querystring and execute the appropriate SQL query. Here is the code:

View Replies View Related

ASP SQL Query Error With Data Types

I am trying to use a query to filter SQL Server 2000 records by a date
value.

Here is relevant columns in my database table (tblContent):

title [nvarchar]
starting [smalldatetime]

.... and here is my query:

Query = "SELECT title FROM tblContent WHERE starting = '" & date & "'"

I've done exactly this query on numberous occassions in the past with no
problems at all but this time I get the following error:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of char data
type to smalldatetime data type resulted in an out-of-range smalldatetime
value.

What on earth is going on? I'm not using a char data type anywhere! I am
doing all the initial development locally and I have just installed XP
Service Pack 2. I realise it's unlikely, but that's the only thing I can
possibly attribute it to. Or am I just missing something obvious?

View Replies View Related

Passing Correct Value Types From ASP/VBScript To VB/DLL

I'm getting an error on my ASP page:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'StoreFileIntoField'

I assume - 99.5% - the error is generated because of worng value types,
I attemp to pass from my ASP/VBScript page to the VB/DLL function.

My relevant ASP/VBScript Code:

View Replies View Related

Passing Correct Value Types From ASP/VBScript To VB/DLL

I'm getting an error on my ASP page:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'StoreFileIntoField'

I assume - 99.5% - the error is generated because of worng value types,
I attemp to pass from my ASP/VBScript page to the VB/DLL function.

My relevant ASP/VBScript Code is:

View Replies View Related

Converting String Types In Stored Procedure

I have the following stored procedure:

CREATE PROCEDURE [dbo].[GET_CategoryCurrentNewsList]
@Category VARCHAR
AS

BEGIN

SELECT dbo.News_Joined.NewsTitle, dbo.News_Joined.NewsID
FROM dbo.News_Joined
WHERE (dbo.News_Joined.StartDate <= GETDATE()) AND (dbo.News_Joined.EndDate >= GETDATE()) AND (dbo.News_Joined.CategoryID IN (@Category))

END
GO

dbo.news_Joined.CategoryID is an INT, and @Category is a string such as (1000, 1010, 1020). However, no results are returned. I figured I had to do something to do some string conversions from INT to VARCHAR or something, but I can't use CSTR. I do not know how many numbers will be passed to @Category, so making seperate variables isn't an option.

Any ideas???

View Replies View Related

Data Types And Export To Excel From ASP Page

My asp/sql server application gets an error, but only when you use the
Excel export option:

<% Response.ContentType="application/vnd.ms-excel" %> (very popular w/
users)


I think somebody entered a string of characters that Excel does not
like:

So I believe (but not sure) some character(s) in a Ntext sql server
field "desc_text" is confusing the Excel file and causing it to error
(and crashes Excel)

So far, I have attempted three fixes with no success

1) Tried to convert the data type in the SQL query:
CAST(sr.desc_text AS VARCHAR(255))


2) Tried to convert the data type in the vbscript:
<% desc_text1 = Cstr(rs.fields.item("desc_text").value)%>


3) Tried append an apostrophe to the beginning of the field so that
Excel would not read it as a formula. (this might have worked, but
Excel does not treat an apostrophe the same from an export as it does
if you typed it in directly)

<%response.write "'"%> <% response.write desc_text1%>

Soliciting all ideas!

Also, if you have any ideas on how to isolate and identify the
specific record and character(s) that is causing the error, that would
be great. I have it narrowed down to a record set of 600 records, and
the error occurs if I include beyond the 130th character position. The
problem does not occur if I use CAST(sr.desc_text AS VARCHAR(129))

View Replies View Related

How To Deal With Multiple MIME Types In ASP Pages

How to display this str in a proper format accordingly to the MIME type specified in side the str? Code:

View Replies View Related

Converting An Image File To Hexa, Read Text File

i'm converting an image file to hexa..then the hexa is saved to a text file..

can any one help me how to read the content text of a text file?...

im doing it this way because i don't want to save hexa in my database, because it makes the database slower to open up.

View Replies View Related

File Properties :: Find Out The Width And Height Of An Image File

is there a way, using asp, to find out the width and height of an image file?

View Replies View Related

File System Object - Check If File Is Being Read

I have code that loops through a directory reading files..

now the problem is that files are constantly being uploaded and I only want the file system object to read those that are finished being uploaded.

How can I check the properties of the file to see if it's in middle of being written before i read the file?

View Replies View Related







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