Session.LCID does not work
I live in Brazil and i am trying to set my application to=20
work with american date format.=20
The problem is, even when i set the LCID property at the=20
beginning of my code, it always returns the date in=20
brazilian date format. Example:
<% @Language=3DVBSCript %>
<% Session.LCID=3D1033 %>
<% Response.write (now & "<BR>" & Session.LCID) %>
This code should return:=20
MM/DD/YYYY HH:MM AM or PM
1033
But it=B4s returning:
DD/MM/YYYY HH:MM
1033
Do you see? The LCID is correct but it keeps showing the=20
date in brazilian format? What the hell is happenning? Can=20
any one help me? Tag: Posting Unicode Form Values Tag: 275298
Reducing Spam Associated with Posting to Newsgroups
Due to a recent increase in spam sent to posters in newsgroups, Microsoft advises that newsgroup participants should consider avoiding posting to newsgroups using their real email address. Microsoft is also committed to continuing to address the issue of spam from a technological perspective.
To help avoid receiving unwanted messages (spam) in your regular e-mail account, you may not want to include your regular e-mail address when you post a question or reply to a post in a discussion group. Instead you may want to do one of the following:
* Use a modified e-mail address: Use a different version of your e-mail address that others will understand, but that spam tools can't automatically pick up. For example, if your actual e-mail address is "emailname@account.com", consider using a modified e-mail address such as: "emailnameaccount.com.invalid", emailname@REMOVE_CAPS_AND_INVALIDaccount.com.invalid, or emailname@account.com.NO_SPAM. In this case, the spam tools will send mail to an invalid e-mail address, and others will know to exclude the "(removethis)" when they send you e-mail. When you post a question or reply to a discussion group, just enter your modified e-mail address in the appropriate box.
* Use a secondary e-mail account: Set up or use an e-mail account, such as a Hotmail account, that is separate from your primary account for posting to discussion groups. When you post a question or reply to a discussion group, use your Hotmail account as your e-mail address.
If you have feedback or questions about this, please post a reply in the newsgroup, or contact us at http://register.microsoft.com/contactus30/contactus.asp?domain=communities
Thanks!
Microsoft Communities Team Tag: Posting Unicode Form Values Tag: 275297
Secured ASP web site
All:
1) Could any one show me any website which is using asp, ssl, sql server?
2) Is ASP/IIS technology good enough to create a commerical secured internet
web application?
3) People said most of the secured internet web application (e.g.
banking...) is using java, is that true?
Simon Tag: Posting Unicode Form Values Tag: 275296
import txt into database
Hi,
I still have problem to import the text file delimited by tabs or commas
into the database.
I refer to http://www.connectionstrings.com/ for the connection, ODBC
doesn't work and OLD DB works only for csv files. Any idea? Does anybody has
workable samples? Thanks a lot.
ODBC
Standard:
"Driver={Microsoft Text Driver (*.txt;
*.csv)};Dbq=c:\txtFilesFolder\;Extensions=asc,csv,tab,txt;"
OLE DB
Standard:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended
Properties=""text;HDR=Yes;FMT=Delimited"""
Atse Tag: Posting Unicode Form Values Tag: 275291
FSO Woes(kinda long post)
Lets see if I can explain this so I can get a good answer =)
I'm trying to speed up a file search via FSO. I have a database that
contains the exact path where files can be found and an "index" number
assigned to each file. This index number is part of each files name.
Example:
DB columns
filepath flindex
pathname 123
pathname 124
pathname 125
etc etc
Now the file structure is:
pathname\123 file.txt
pathname\124 file.txt
pathname\125 file.txt
Now if the actual file names were just a single extension I wouldn't have
any problems because then I could just call up each file, my problem is that
this "index" number is kinda like a place holder for any file type.
pathname\123 file.txt
pathname\123 file.pdf
pathname\123 file.doc
In my current code I end up using this:
For Each fl in fc
fileIndex = Left(fl.name,InStr(fl.name," "))
if fileIndex = flindex & " " Then
Response.write ("|<a href ='" & webpath & fl.name & "' >" & fl.name &
"</a>|")
End if
Next
The above code works great, gives me the links I'm looking for based on each
"indexed" file. My only serious issue is that depending on the exact path I
might loop through only 10 files, or I might loop through 1000's of files.
It is these paths with 1000's of files where my heartache comes from. It
might take up to a minute for the code to loop through a given folder to
match the indexed files I'm looking for.
I'm sorry for making this post so long, but I thought it might give everyone
a better idea of what I'm trying to accomplish if given more background.
So.... what I'm wanting to ask, is there anyway to possibly speed up my
files searches? Or am I just stuck looping until I find my matches? Tag: Posting Unicode Form Values Tag: 275274
BODY ONLOAD() INTERNET EXPLORER 6.0.2 SCRIPT ERROR
Hi all,
Can you please help me out with this???? i've been using body onload()
for ages but since i changed my internet explorer (to 6.02) and OS
(XP), i started to get this IE script error and i don't know how to
get rid of it!!!! I read somewhere that if I put the onload event in
an inline script tag at the
bottom of the my form body, it all works fine, but this doesn't work
either!!!!
Can someone tell me what i should do????
thanks a million!!!! Tag: Posting Unicode Form Values Tag: 275273
downloadable text file
Hi,
If I click on the URL of a text file, it opens on the IE. How can I make it
to prompt being downloaded instead of being opened on the IE? Thanks for any
idea.
Atse Tag: Posting Unicode Form Values Tag: 275268
Checkbox Set To OFF Not In Request.Form
When using checkboxes on a form, if you uncheck them, the unchecked
name/value pair in the Request.Form collection doesn't show up. It only
shows when the checkbox is set to ON.
Is this correct? What's the workaround if it is? Tag: Posting Unicode Form Values Tag: 275264
mapping to users home directory
I am trying to write an asp or aspx page that will create
a virtual ftp directory to the users Active Directory
home directory. That way a user can interact (drag/drop,
copy/paste) via IE with folder view for ftp sites.
I have some code, that seems to be "flaky" it works for
me and some others, but not everyone. I really need to
get a stable version. My asp code is below. Having it
in ASP is fine, but it would be a bonus to have a solid
ASPX (ASP.net) solution.
There is one issue I have ran into that is pretty
annoying, and I am not sure if it can be fixed or not and
that is the security of the virtual directory and file.
I would prefer that when the user is at work on the
network and logged in with their AD account that they
would not be challenged to authenticate, but I could not
get the "request.ServerVariables("AUTH_PASSWORD")" method
to work unless Basic Authentication is used, requiring
the user to login. I do not know if this can be avoided
in ASP.net, but if I can use an aspx page that can get
the password without having to decrypt or whatever that
would be ideal. Anyway, here is the code I have:
----------------------------------------------------------
-------------------------
<%
strFullUserName = request.ServerVariables("AUTH_USER")
strUserPass = request.ServerVariables("AUTH_PASSWORD")
strWebServer = request.ServerVariables("SERVER_NAME")
strWebServerIP = request.ServerVariables("LOCAL_ADDR")
'Split domain and username
strUserDomain = strFullUserName
strUserDomain = Mid (strFullUserName, 1, Instr
(strFullUserName, "\")-1)
strUserDomainLength = len(strUserDomain)
strFullUserNameLength = Len(strFullUserName)
strUserName = Right (strFullUserName,
strFullUserNameLength - strUserDomainLength -1)
Set objUser = GetObject("WinNT://" & strUserDomain & "/"
& strUserName, user)
strUserHome = objUser.homeDirectory
strVD = "ftp://" & strWebServer & "/"
On Error Resume Next
Set IISOBJ = GetObject
("IIS://Localhost/MSFTPSVC/1/Root")
Set NewDir = IISOBJ.Create("IIsFtpVirtualDir",
strUserName)
Error.Number = 0
NewDir.Path = strUserHome
NewDir.AccessRead = True
NewDir.AccessWrite = True
NewDir.UNCUserName = strfullUserName
NewDir.UNCPassword = strUserPass
NewDir.SetInfo
Set NewDir=Nothing
Set IISObJ=Nothing
Response.Redirect( "ftp://testportal" )
'response.write ("Your P Drive Was Mapped
Successfully!"& "<a href=""ftp://testportal/"">Click
Here</a><br>")
%> Tag: Posting Unicode Form Values Tag: 275262
_vti_cnf
Why does ASP create a directory named _vti_cnf containing all the files of
an application for each application? Can deleting those directories
permanently cause some problems?
Thanks,
Arpan Tag: Posting Unicode Form Values Tag: 275248
Arabic / Russian text in asp/ie built-in editor/access
Hello!
I am to develop a multi-lingual website / content management system.
I will use ASP (IIS on swedish or english windows 2000), Access, and
for the content editing i will use the built-in editor in IE (in an IFRAME).
Primary languages/charsets, apart from the western languages (swedish,
english etc) will be russian and arabic.
Does anyone know how (if) this works?
What should my main concerns be, will it work and what will the likely
problems be?
I've tried to insert arabic text in regular text-fields in existing
applications,
but when they reach the database the text has been alterd.
Though I can paste the same text directly into the database. Why?
/ Linda Tag: Posting Unicode Form Values Tag: 275247
_vti_cnf
Why does ASP create a directory named _vti_cnf containing all the files of
an application for each application? Can deleting those directories
permanently cause some problems?
Thanks,
Arpan Tag: Posting Unicode Form Values Tag: 275246
Including Static Content
I'm using the Server.Execute method to include a static page inside a
dynamic database call. This static page is not a valid HTML page (i.e.
lacking <body>,<head>, etc. elements), but I'm pulling it into the dynamic
page just to give the content an upgrade in presentation, including images.
The problem is that there is no way to have relative URLs in the content
page, so all the image src's are wrong. Is there a better way to include
static content like this, or a way to alter the contents on the static page
prior to running Server.Execute (I could parse the file via the
FileSystemObject, but I'm hoping not to do that)?
Thanks, j Tag: Posting Unicode Form Values Tag: 275241
date formatting
i have a date in the following format: 12/1/2003
how do i reference just the 'day' portion of this date - in other words '1'
if the date was 12/10/2003, then i would just want the '10'
tia
jt Tag: Posting Unicode Form Values Tag: 275234
FSO FileExists Method
I would like to know if I'm correct in the way I coded this:
Function CheckFileExists(sFileName)
If (fs.FileExists(sFileName)) Then
CheckFileExists = True
Else
CheckFileExists = False
End If
End Function
If CheckFileExists(Whichfolder & flindex & ".tif") Then
'java code to display the tif inline with the browser
else
'code stating there is no file to display
End if
I just want to make sure that (Whichfolder & flindex & ".tif") which is an
actual file path is what is being passed to the Function CheckFileExists as
sFileName
Thanks from this ASP Newbie Tag: Posting Unicode Form Values Tag: 275232
Using the same page for viewing, editing and adding records
Hi All
I am not an ASP expert but do some coding in ASP. I am lookng to learn how
to code a form/page which can be used to view, create or edit/update a
record.
I have simple 3 field table but I don't to write three seperate pages ASP
pages to view edit or create new records.
I have seen in the past others coders pass the querystring value
Action?=Create etc and then using the logic to work their way around that
but if someone has an example I would apprecate the code.
thanks Tag: Posting Unicode Form Values Tag: 275224
Select multiple items from a dropdown
I want an ASP page with a dropdown and a simple button. Every time the user
chooses an item from the dropdown and clicks on the button i want that value
written below in list and allow user to select more.
Also how can these choices be saved somehow so tha when the user goes to the
next page the choices he made can be written to the database.
For example
The choices in the dropdown may be
London
Dublin
Paris
New York
When the user chooses Dublin I want ti written below the dropdown. Then when
he chooses New York. I want it added to london. so that it displays
Dublin
London
Then when he click next button these two choices are taken over to the next
page where an insert query can be used to insert them into the db. Tag: Posting Unicode Form Values Tag: 275222
Access hidden field
Hi group, I'm trying to write to a hidden field on a form from a page that
is loaded as the "src" in an iframe. I keep getting "Access denied" in the
javascript of childform.asp...I have tried many variation in trying to
reference the hidden field on the parent form with no success...can anyone
suggest the syntax?
Thanks much
here's sample code:
parentform.asp:
<html>
.
<form name=frm id =frm>
<type=hidden id=hiddenfield name=hiddenfield>
<iframe name="child" id="child" src="childform.asp" width="100%"
height="88%" scrolling="auto" align="left"></iframe>
</form>
.
</html>
childform.asp
<html>
.
<script language="javascript">
top.document.hiddenfield.value = someValue;
</script>
.
</html> Tag: Posting Unicode Form Values Tag: 275219
drop down population help needed - thanks
In my data base I have a list of componet types e.g. type A - I have 8 off
- type B I have 12 off etc.
I'm using
Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM
Parts_Table")
to populate a drop down but would like to use several drop downs
restricting the contents of each drop down to the records pertaining to one
particular componet type eg a drop down only for type A, only for type B
etc.
can this be done if so how?
The other thing I like to do is add the price field to the drop down list
(two fields in one drop down) is this done just by seperating the fields by
a ","? Tag: Posting Unicode Form Values Tag: 275216
How can I get the checkbox's value
Hello,
I made this code:
...
<%
dim xyz
xyz = Request.Form("checkbox1")
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM action="Forwarding.asp" method=post id=form1 name=form1>
<INPUT type="checkbox" id="checkbox1" name="checkbox1"><BR>
...
but,
xyz can't get the "checkbox1"'s value.
Can you help me Tag: Posting Unicode Form Values Tag: 275209
Switching Between HTTP and HTTPS
Hi
I wish to have a web site that has most of the pages as normal HTTP pages
but has some areas that use HTTPS. I want to have it that if a user selects
a link to a HTTPS page that they go there an there Session Information is
kept. I also wish to have the pages switch automatically to HTTPS if a
visitor types the URL without the HTTPS. So my questions are:
1) How to redirect to a Secure Page without losing Session Info?
2) How to test if page is accessed by HTTPS, and if not switch to HTTPS
quickly?
I think something like this code is what I want but how do I do it.
<%
if not "HTTPS" then
response.redirect(https://mysite.com/securepage.asp)
end if
%>
Thanks for the help.
Kenneth Keeley Tag: Posting Unicode Form Values Tag: 275207
Can ASP create OLE objects?
Hi,
I've a client-server application written in Access. Some of the codings make
use of OLE so that the Access application creates a Word document on the fly
and fit in relevant values.
I'm examining if using ASP pages can do similar function (to create and
manipulate OLE objects)?
Anybody knows if ASP can do?
If ASP can't, how about ASP.NET?
thanks in advance,
jackling. Tag: Posting Unicode Form Values Tag: 275203
Problem with %
Hello!
I have a SELECT comand passed trhough ASP like This:
SELECT PK_A_MSGID, C3_MSG, C3_MSGPT, C3_MSGEN FROM S_MSGS WHERE C3_MSG LIKE
""%Efectuar%"" ORDER BY PK_A_MSGID
and when i pass it it gives me:
SELECT PK_A_MSGID, C3_MSG, C3_MSGPT, C3_MSGEN FROM S_MSGS WHERE C3_MSG LIKE
"ïectuar" ORDER BY PK_A_MSGID
Why? how can i correct this?
Thanks Tag: Posting Unicode Form Values Tag: 275197
Checking status of an array
Good day folks.
Within an ASP I'm working on I need to check whether an array is empty or
not.
Code:
Dim somearray()
'other code: array might have been populated, maybe not
if somearray() <> "" Then 'this is the line that hangs debugging using VID
'code if array is populated
else
'code if array is empty
end if
My problem is coming up when I debug(Using VID) I get this error:
An exception of type 'Microsoft VBScript runtime error: Subscript out of
range' was not handled.
But when I actually launch the page I don't get any errors. Of course if I
put in On Error Resume Next, and I run in debug mode I don't get any errors
through VID and I still obviously I don't get any errors launching the page.
Thanks for any insight from this ASP Newbie Tag: Posting Unicode Form Values Tag: 275189
E-mail formatting?
When e-mailing invoices and estimates, is there any way to customize the
presentation of the e-mail beyond changing the message? Specifically,
I'd like to add some html so the receiver can click on a link to pay
online. As it is, I can type the URL in the message, but it appears only
as text to the reader, not a hotlink, which, unfortunately, is quite
vexing to some of my clients.
It would also be nice to add a company logo, etc. to the email body.
On this same subject, is it possible to send the entire invoice/estimate
as HTML rather than an attached PDF? I haven't seen these options
anywhere.
Thanks. Tag: Posting Unicode Form Values Tag: 275180
iframe and session
Hi group, I've inherited some code which has a menu page
with an embedded iframe which displays the page
corresponding to menu clicks. i was attempting to pass a
session variable into the iframe page. sadly, it seems
that the page displayed in the iframe and the "hosting"
menu page are different session. i discovered this by
placing response.write(session.sessionid) in both pages.
why is this? is there a way to make the iframe page part
of the original session?
thanks for any thoughts... Tag: Posting Unicode Form Values Tag: 275170
ASP to CSV
Has anyone any experience of outputting data (field name, field value) to a
.csv file so I can email it off (for importing into a sperate database
system)?
Are there any pitfulls I should look out for?
Thanks
Jon Tag: Posting Unicode Form Values Tag: 275163
button passed to URL
I've never seen this before. I am new to querystrings, as just using hidden
fields and the POST method has been more than adequate for me until
recently. But I started using the GET method, and I noticed that when I
clicked the submit button, it gave me this for a URL:
http://localhost/DisplayTickets.ASP?selectTSE=271&Status=2&btnsearchTSE.x=28&btnsearchTSE.y=11
The thing is, selectTSE and Status are the two <SELECT> boxes, so I
understand them being there. But why is is telling me the x and y
coordinates of where I clicked the button to submit the form?
I should add that the submit button is an image, not a regular button.
This doesn't hurt anything, just wondering why it's there. And maybe it will
hurt something later on; I don't know enough to say. Tag: Posting Unicode Form Values Tag: 275161
Running iisreset
Hello all,
I am trying to perform a reboot on my server from an asp
page. I have a link on my page that, when clicked on,
redirects to a .stm page that displays a message about
the server rebooting and executes the following command:
<!-- #exec CMD="cmd.exe /C iisreset /REBOOT" -->. When I
click on the link the message is displayed but the server
does not reboot. I know that in order for the #exec
command to work you have to add a key in the registry,
and disable anonymous access to the folder containing
the .stm page. I have done both of these and yet I still
can't get the server to reboot. Can anyone help me with
this, or know another way that I can browse to an asp
page on the server and perform a reboot? Tag: Posting Unicode Form Values Tag: 275155
Can ASP find all images in a file?
Hello,
Using ASP, can all the images in a file be listed, so I can then get ASP to
determine the combined size of these files to give an estimate of load time?
Thanks for any help
Gram. Tag: Posting Unicode Form Values Tag: 275151
Can I Handle Error 404 JUST Using ASP ?
understand that through IIS you can implement custom error messages,
but since we are in hosted environment, we need to implement custom
error pages using ASP.
Is this possible and could someone point us in the right direction on
how to do this ?
Thanks
Bud Tag: Posting Unicode Form Values Tag: 275147
ASP and Excel
How can I use ASP to read data in an Excel file and than write it in the
format of XML?
Thanks!
--
Jessie Tag: Posting Unicode Form Values Tag: 275144
session vars en frames: contents of var dropped in new window???
Hello,
Currently developping a site, where I use some session variables.
The site is located at my home computer.
Because I have a dynamic IP adress, I use no-ip (www.no-ip.org) to have my
own custom domain name (pvo.no-ip.org)
My ISP blocks port 80, so website runs at port 4040
The service no-ip offers "Mask / Cloaking Options": every request to my
domain is "wrapped in a frame", so end user can only see one URL in browser.
In example a request to
http://plestest.no-ip.info/milan/test/session_array/create_array.asp
gives a page to the client like:
<FRAMESET ROWS="100%,*" FRAMEBORDER=NO FRAMESPACING=0 BORDER=0>
<FRAME
SRC="http://pvo.no-ip.org:4040/milan/test/session_array/create_array.asp"
NAME="redir_frame">
</FRAMESET>
So the actually page is "wrapped" in the frame.
This is automatically done by the no-ip service.
So far so good.
However,
both links:
URL1 http://plesberk.no-ip.info/milan/test/session_array/create_array.asp
(points to pvo.no-ip.org, NO mask)
URL2 http://plestest.no-ip.info/milan/test/session_array/create_array.asp
(points to pvo.no-ip.org, MASK enabled)
point to the same file on my server
As you can see, the first link shows the full URL (to domain pvo.no-ip.org),
the second drops the port number and leaves the URL to plestest.no-ip.info
(and is more user-friendly)
The file actually creates an array (list of files of current direcotry),
stores it in variable "aFiles" and stores it also in session variable
"aFiles"
The debugging information shows that aFiles is an array, and lists also the
contents of the array
From this page, I want to open a new window, where I can use the contents of
session variable "aFiles".
This is done by the link on the top of the page.
The problem now is that everything works fine for the first URL1 (no port
mask or frame use), but the session var "aFiles" has NO contents with the
link used on second URL2.
I think this is caused by the fact that following the hyperlink, causes the
frame to be left and the link points to the real URL of file (thus WITH port
number, and NO mask)
Is there a way to avoid this?
I noticed that
-opening page URL2
http://plestest.no-ip.info/milan/test/session_array/create_array.asp
(window 1)
-follow "link in new window" (window 2 opens)
-refresh original page (window 1)
-follow "link in new window" again (window 2 refreshes)
-----> the session var "aFiles" HAS values now
very weird behaviour in my opinion...
Has anybody an idea how session vars deal with frames or URL's ?
tia
bartp
--
HyperART
Paul Van Ostaijenlaan 4
3001 Heverlee Tag: Posting Unicode Form Values Tag: 275143
Format time
Hello
I'm trying to us the formatdatetime function to format US-time and it doesnt
give me the seconds
how to do that?
2002-02-02 06:00 AM gives 6:00 AM when I want 6:00:00 AM
/Lasse Tag: Posting Unicode Form Values Tag: 275137
Regexp: Matching unquoted attributes
I'm attempting to clean up HTML in a database by quoting all unquoted
attributes.
So far, I have this:
oRegExp.Pattern = "<([^>]+)=([^>""]+)>"
sHtml = oRegExp.Replace(sHtml, "<$1=""$2"">")
which I can use to replace single attributes:
<p class=foo> becomes <p class="foo">
Now I'm trying to deal with multiple attributes and am getting myself
into a pickle converting:
<p class=foo name=bar> into <p class="foo" name="bar">
The best I've come up with so far is:
oRegExp.Pattern = "<(\w*\s)(([^=>]+=)([^>""\s]+))+>"
sHtml = oRegExp.Replace(sHtml, "<$1 $3""$4"">")
which obviously isn't going to work! :)
How can I match multiple unquoted attributes and replace them with quotes?
Thanks
Drew Tag: Posting Unicode Form Values Tag: 275132
Syntax error in Query Expression,
Hi everyone
I have a page on my site in which i wish to display links to brochures, and
i have stored an index of these links in my database.
however when i pass from the master page,
http://www.tripakltd.com/brochures.asp to the detail page, by selecting a
item from the list/menu and submitting, i cannot seem to be able to carry a
variable as a value, i.e i am submitting CategoryID as a variable so i want
it to equal % but i only seem to be able to get it to work if a specify a
figure, such as number 1, and then that isnt very useful because for every
product i select on the drop down list/menu i'll only receive the brochures
associated with number 1.
Please could someone assist me with fixing this?
Many thanks
Raphael Tag: Posting Unicode Form Values Tag: 275131
BrowserType
Hi all!
I'm having problems with instanciating MSWC.BrowserType in
my VB6 component, i do like this.
Declaration:
Private objBC As BrowserType.BrowserCap
In my public sub:
Set objBC = Server.CreateObject("MSWC.BrowserType")
bcBrowser = objBC.browser
Generates error:
006~ASP 0177~Server.CreateObject Failed~There is no MTS
object context
Works fine when used in an .asp page but not in my COM,
why?
And