|
This has nothing at all to do with UrlEncode. It only has to do with how you convert the date into a string. UrlEncode doesn't change depending on the culture, it always encodes the string the same way.
UrlEncode doesn't encode a date, it only encodes strings. If you are trying to encode a date, it will implicitly be formatted into a string before it's sent to the UrlEncode method.
---
single minded; short sighted; long gone;
|
|
|
|
|
That's understood Guffa, my question was arrising from on 3 servers I passed in a string 28/02/2007 (not using a date funtion) so I could control the input.
On 3 boxes the output is 28%0F02%0F2007 on the 1 hosted server in Germany I get 28%0E02%0E2007
The result of the %0E is that the string received at the other end is 28.02.2007 not 28/02/2007..
Nigel.
|
|
|
|
|
The characters "/" and "." would be URL-encoded into %2F and %2E, not %0F and %0E. Can you show the real output from the servers? If you just fake the output there is no point in showing it at all.
Also it would help if you show the code that produced the output.
If what you are saying is really true, then the script engine is badly broken, as the UrlEncode method is incapable of correctly encoding a string.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffy,
Sorry the %0E was a mistake is it %2E
This is my Code
---
response.write "<p><A HREF=info.asp?date="& Server.URLEncode(dToday) & " CLASS='EVENT' TARGET='rightframe'> =================<br>Load Monthly View<br>=================<br> </A>"
response.write "dtoday unencoded = " & dToday
response.write "date encoding = " & Server.URLEncode(dToday)
----
This is the output copied directly from the webserver
dtoday unencoded = 28/02/2007
date encoding = 28%2E02%2E2007
As you can see very odd!
Regards
Nigel...
|
|
|
|
|
Yes, that seems impossible.
Where do you set the value of the dToday variable?
---
single minded; short sighted; long gone;
|
|
|
|
|
This is the output from the webpage. Also when I place my mouse over the link on the site IE show this as what going to be processed.
dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear)
I have this gives the 28/02/2007 I have also hard coded this for a test. Same Result...
I have the identical code runnnin on my local SQL Server and it gives the correct Value %2F (That's UK locale) I even try changing my LCID on my local machine, and I cannot break it..... Changing LCID on the hosted server just changes the format of the date, but not the encoded value.
The only difference is that this is a hosted server in Germany.... I've emailed the ISP but they generally don't get involved in coding issues, however I think this is something wrong, as / should always convert to %2F.
-- modified at 14:52 Sunday 18th February, 2007
|
|
|
|
|
Nigel K Williams wrote: dToday = CDate(intThisMonth & "/" & intPrintDay & "/" & intThisYear)
So dToday is a date variable, not a string; thus the German server, when urlencoding it, will convert it to, for eg, 28.02.2007 irrespective of how you have formatted it.
Fred
|
|
|
|
|
I would agree with that however, if I put a line just above the encoding saying dToday = "28/02/2007" It still gives me 28%2E02%2E2007.
That's what's confusing me.
Nigel.
|
|
|
|
|
Is your original line with the CDate() still in there though, even if before this? Try deleting it (or REM'ing it out) and see if that helps...
Fred
|
|
|
|
|
Fred,
If I manually pass in a string (for testing) then the CDate is not taking effect and the problem still happens... I've worked around this with a character replace on the receiving end to convert the date back to what I want, so It's not a real problem. It's just stupid things like this niggle me.
|
|
|
|
|
Hi,
Try this using Dateserial(yyyy,mm,dd). This may solve your problem
Regards,
Manowj
|
|
|
|
|
Hello Everyone,
I am trying to disable horizontal scroll but keep vertical. I am sure I did this a couple years ago with javascript but cant remember how. Would be greatful if anyone could help.
thanks
Nicky
|
|
|
|
|
This should do it:
[CSS]
<style type="text/css">
<!--
html, body{
overflow-x:hidden;
}
-->
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
Hi,
Can anyone give me some pointers on the best way of setting up a mirror website? (On Windows platform.) Tried Google but maybe I'm not asking the right question...
cheers
Fred
|
|
|
|
|
Define Mirror..
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Well.. we have a website, vital to our business. If it goes down for any reason we want to be able to point our clients to another url (on another server) which has a mirror of our website on it. The site is written in asp.net with a mysql database.
Obviously I can set this up manually and take regular backups and copy them over, but there must be some way of automating all this...
cheers
Fred
|
|
|
|
|
Create a script that simply copies the data over to the other servers FTP directory (actually it is safer for the redundancy server to call what it needs).
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
And if you're using SQL Server this has built in replication functions for the data.....if you've got any data, you didn't say
|
|
|
|
|
Replicating databases is always very messy. I have normally went for a system where important updates (like personal details) are automatically added straight away to redundancy servers.
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
Thanks Brad - yes I'm actually not too concerned about the database (mySQl as it happens) as, as you say, this can be updated in real time anyway. But the CMS of the site also allows admin users to upload images and other files (pdf and doc) for public view and download, and somehow I want to get these over to the mirror server too... further trouble is I will prob only have ftp access to the mirror (as opposed to full control/access over the "main" server.
cheers
Fred
|
|
|
|
|
Hi all,
I am creating an application in Visual Studion 2005 (Asp.Net )and the language used is C#.Net.It's a Web Based Application .I put a TreeView Control in one my page.But in TreeView Control ,I need to add one more column means ,Its looks like
+ First 2
- Second 3
+ Third
+ Fourth
+ Fifth
+ Seventh 4
The heirarchical list shows the name of some topics inside a book and the right sided number shows the page number.The page number will be a link.How can I create a TreeStructure like this.Or please tell me an alternate solution for this..
Thanks In advance,
Jeeva
|
|
|
|
|
Can anyone tell me how to clear the Cache.For example: if I type the username and next time i use the other name. These name are stored as Cache in the textbox; it shows the previous datas that i have typed. Can u tell me How to clear those Cache.
Regards,
LEE
|
|
|
|
|
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Read More ~
So, You Don't Want To Cache, Huh?
If you wanna do manually then just delete "history, cookies, form info". Internet Options -> Delete "Broswing History"
Hope it helps.
|
|
|
|
|
HTML Goodies.... the Ultimate resource.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi there,
I want to get difference between two times in php. As for example, 13:31:00 - 05:25:00 = 08:06:00.
Can you suggest me the way to solve this problem??
Thank You in advance.
Waiting for your reply.
|
|
|
|