|
I've heard rumours that Microsoft may support Apache in ASP.NET and presumably in Visual Studio .NET.
Does anyone know what percentage of Windows servers are using Apache?
Naturally MS would prefer that everyone uses IIS. However, supporting Apache from within Visual Studio .NET could be a smart move for MS financially.
1) If there are substantial numbers using Apache on Windows and who are using a non-ASP server-side technology they could be persuaded to move to Visual Studio .NET and ASP.NET, thus increasing MS's revenues.
2) Substantial numbers of those running Apache on Unix or Linux servers may have chosen Unix/Linux because they prefer Apache to IIS and Apache has hitherto been better catered for on Unix. With Apache being supported within Visual Studio .NET they might be persuaded to go for Windows and Visual Studio .NET, thus increasing MS's revenues.
Of course, those people running Linux rather than Unix may not be so keen to move to a Windows server. So scenario (1) is probably more likely.
Kevin
|
|
|
|
|
Hello... I'm new in using ASP. I just would like to know how to develop address books using ASP. Thank you.
|
|
|
|
|
There are several articles written here that show how to develop a Guestbook, you should be able to easily modify these to suit your needs. Check the following:
In Plain Vanilla ASP:
ASP.NET Flavor Of The Month:
Nick Parker
|
|
|
|
|
I thought I would just put together a quick page in ASP.NET to replace the old one I have written in ASP that uses the Dundas control.
Anyway, nice and easy, especially with the articles on this site, 10 minutes I have an upload/Download page and a database (SQL2000)
My only problem is it does not work
I have the following code where theFile is a HttpPostedFile object.
1: byte[] myData = new byte[theFile.ContentLength]; <br />
2: theFile.SaveAs (@"c:\test.jpg") ;
3: theFile.InputStream.Read(myData, 0, theFile.ContentLength);<br />
4: dbRow["FileData"] = myData ;
Now, line 2 works fine and I can see the picture saved onto my hard disk, but line 3 does not, the myData array remains full of zeros, but it is set to the correct size in line 1.
What started as a 15 minute job is now taking hours.
Anyone else seen this problem or know what I am doing wrong here?
Thanks
Stephen.
|
|
|
|
|
Found the answer in the end, just needed to reset the InputStream's position to the begining of the file with
theFile.InputStream.Seek (0, System.IO.SeekOrigin.Begin) ;
I had assumed that it would have thrown an exception if it had tried to read beyond the end of the stream.
Stephen
|
|
|
|
|
I manage an Intranet and have been having some problems with some files (.xls, .doc, .ppt, etc.) getting cached into memory when a user downloads them. If the file gets updated, certain users still see the old version for anywhere from ~1 day to ~1 week. I tried everything from refreshing/reloading the pages to clearing all temporary files from the computers but I cannot find a way to force the browser to download the latest version of these files. One thing that confuses me is that this only happens to some users, even though we are on an Intranet with standard computers and standared program settings.
I threw together the following script that solves this problem because it tricks the browser into thinking that it is downloading a file that it has never seen before by assigning it a random variable at the end.
<script type="text/vbscript">
randomize()
document.write ("<a href='filename.xls?id=")
document.write (CInt(RND * 2000))
document.write ("'>Link Name</a>")
</script>
Does anyone have any comments on this or know of a better way to do things?
Chris LaQuerre
Internet Technologies Consultant
|
|
|
|
|
There is a pragma-no cache directive that can be inserted as a meta tag in the header of the html document. I cannot remember it exactly the syntax.
However, the proxy server might cache some html documents, which is generally bad news. In this case the user might hit CTRL+F5 million times and still a cached version will be retrived.
Best regards,
Alexandru Savescu
|
|
|
|
|
Alexpro wrote:
There is a pragma-no cache directive that can be inserted as a meta tag in the header of the html document.
This works for the HTML page itself, but not for the other files (non-HTML documents) that the page is linking to. In my case, I am trying to prevent Microsoft Word, Excel and Powerpoint files from being stored in memory.
Chris LaQuerre
Internet Technologies Consultant
|
|
|
|
|
Hello,
I am using layers for Netscape 4. After defining layers, I am using HTML controls like input box, submit buttons. But these controls are not being displayed after defining layers. If I define these controls before defining layers, these controls are visible.
Can anybody tell me what is the problem?
Thanks
Hitesh
|
|
|
|
|
Hitu wrote:
I am using layers for Netscape 4.
Well my first piece of advice is not to use Layers. But since you already are and probably won't change...
Hitu wrote:
After defining layers, I am using HTML controls like input box, submit buttons. But these controls are not being displayed after defining layers. If I define these controls before defining layers, these controls are visible
Couple things. Make sure you have wrapped the INPUT elements in a FORM element. Netscape sometimes displays INPUTs without a FORM element, and sometimes doesn't. So rather just put the FORM element in.
Another problem is that your LAYER is "covering" the INPUTs. Make sure it's top and left attributes are out of the way of the INPUTs.
Better yet, post the code and I can help.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
Thanks for your reply.
I am sending you the entire file in which I have written the code. I can't see any option here to attach the file, so I am pasting the code inline.
<title>ACH System
function create(select_box)
{
var isNS = (navigator.appName == "Netscape");
var isIE = (navigator.appName == "Microsoft Internet Explorer");
var navversion = parseInt(navigator.appVersion);
temp_count = 0;
var dyn_table;
while(temp_count <= count)
{
if ((isNS) && (navversion < 5)) //For Netscape 4 & Below
{
dyn_table = document.layers["dyn" + temp_count];
dyn_table.visibility='hide';
}
else if ((isNS || isIE) && (navversion >= 5)) //For IE & Netscape 5+
{
dyn_table = document.getElementById("dyn" + temp_count);
dyn_table.style.display='none';
}
else //For IE 4 & below
{
dyn_table = document.all["dyn" + temp_count];
dyn_table.style.visibility='hidden';
}
temp_count++;
}
var table_name = select_box[select_box.selectedIndex].value;
table_name = "dyn" + table_name;
if ((isNS) && (navversion < 5)) //For Netscape 4 & Below
{
dyn_table = document.layers[table_name];
alert("Netscape 4 = " + dyn_table);
dyn_table.visibility='show';
alert(dyn_table + " - " + dyn_table.visibility);
}
else if ((isNS || isIE) && (navversion >= 5)) //For IE & Netscape 5+
{
dyn_table = document.getElementById(table_name);
dyn_table.style.display='';
}
else //For IE 4 & Below
{
dyn_table = document.all[table_name];
dyn_table.style.visibility='visible';
}
}
ACH System
ACH Field Mapping
Company Name: | FDSC | Template Name: | Template1 | Record Delimiter: | Enter character | Field Delimiter: | Space character | Number of Fields: | 10 |
Sr. No. | Field Type | Length |
|
Company ID
Company Name
Bank RT
Bank Account
Account Type Indicator
Amount $
Settlement Date
Credit/Debit Indicator
var isNS = (navigator.appName == "Netscape");
var isIE = (navigator.appName == "Microsoft Internet Explorer");
var navversion = parseInt(navigator.appVersion);
//First Layer, Div
if ((isNS) && (navversion < 5))
{
document.write('<layer id="dyn0">');
}
else
{
document.write('<div id="dyn0">');
}
document.write(' <table>');
document.write(' <tr>');
document.write(' <td>');
document.write(' </td>');
document.write(' </tr>');
document.write(' </table>');
if ((isNS) && (navversion < 5))
{
document.write('</layer>');
}
else
{
document.write('</div>');
}
//End First Layer, Div
//Second Layer, Div
if ((isNS) && (navversion < 5))
{
document.write('<layer id="dyn1">');
}
else
{
document.write('<div id="dyn1">');
}
document.write('<table width="100%">');
document.write(' <tr>');
document.write(' <td align="right">Debit String = </td>');
document.write(' <td><input type="text" name="Debit_String" size="12" /></td>');
document.write(' </tr>');
document.write(' <tr>');
document.write(' <td align="right">Credit String = </td>');
document.write(' <td><input type="text" name="Credit_String" size="12" /></td>');
document.write(' </tr>');
document.write('</table>');
/*
document.write(' Debit String = <input type="text" name="Debit_String" size="12" />');
document.write(' Credit String = <input type="text" name="Credit_String" size="12" />');
*/
if ((isNS) && (navversion < 5))
{
document.write('</layer>');
}
else
{
document.write('</div>');
}
//End Second Layer, Div
document.write(' </td>');
document.write(' <td width="35%" align="center" valign="top">');
document.write(' <input type="text" name="Length1" size="5" value="" />');
document.write(' </td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td width="100%" colspan="3" align="center" valign="top">');
document.write('<input type="submit" value="Save" onClick="return false;" />');
document.write(' <input type="reset" value="Clear All" onClick="return false;" />');
document.write('</td>');
document.write('</tr>');
document.write('</table>');
var isNS = (navigator.appName == "Netscape");
var isIE = (navigator.appName == "Microsoft Internet Explorer");
var navversion = parseInt(navigator.appVersion);
var count = document.forms[0].FieldType.length;
count = 1;
var temp_count = 0;
while(temp_count <= count)
{
if ((isNS) && (navversion < 5)) //For Netscape 4 & Below
{
var dyn_table_temp = document.layers["dyn" + temp_count];
dyn_table_temp.visibility='hide';
}
else if ((isNS || isIE) && (navversion >= 5)) //For IE & Netscape 5+
{
var dyn_table_temp = document.getElementById("dyn" + temp_count);
dyn_table_temp.style.display='none';
}
else //For IE 4 & Below
{
var dyn_table_temp = document.all["dyn" + temp_count];
dyn_table_temp.style.visibility='hidden';
}
//var dyn_table_temp = document.getElementById("dyn" + temp_count);
//dyn_table_temp.style.display='none';
temp_count++;
}
Thanks again.
Hitesh |
|
|
|
|
|
i want help for the code...or just the code...maya be in vbscript or javascript to hide the address bar in Internet Explorer .....in a HTML page.
--thnx
|
|
|
|
|
If you can guarantee, that you WILL NOT use this in a p0rn site:
<nobr><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Welcome to my personal p0rn site!</title>
<script type="text/javascript">
function openPage()
{
window.open("myPage.html", "myWindow", "location=no,toolbar=yes,width=600,height=450");
}
</script>
</head>
<body>
<p><b>You must be 21 or over to enter this site!</b></p>
<a href="javascript:openPage()">ENTER</a>
</body>
</html>
|
|
|
|
|
Colin Leitner wrote:
If you can guarantee, that you WILL NOT use this in a p0rn site:
OT: What do you use to colour your code snippets for the CP forums? They look awesome.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
Paul Watson wrote:
They look awesome.
Hell, ya!
Unless this was a custom job. Either way, Chris should plug this into the posting page.
Cheers,
Simon
"Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)
|
|
|
|
|
Well I use MS Visual Studio 7 to write my markup and modified the colors.
Well it takes me have an hour to post a code snippet like this one .
Currently I'm writing at a XSLT stylesheet to format markup, cause it takes way to long to do it by hand. Maybe I'll write a C/C++ converter but that's not that easy (who would have thought that?)
Here a little guide:
Put all code in these tags
<nobr><div
style="background-color: rgb(225, 240, 255); color: black; font-family: 'Courier New', monospace; padding: 2px 2px 2px 2px; margin: 5px 5px 5px 5px; border: solid 1px silver;" >
<nobr>
* Place your code here *
</nobr>
</div>
Use 2 s to indent every step.
And this is the hard one: color every element by hand with <span style="color: [color];">* Element *</span>
|
|
|
|
|
Can anyone point me in the right direction in regards of how to develop a file manager system?
I would like to create one for my website so I can share files, upload/download.
I don't want to buy one.
Is this possible in ASP w/ VBScript or JavaScript??
much thanks ,
|
|
|
|
|
Yep, of course it is possible. You should use FileSystemObject for this purpose (make sure it is available on your site). It has all needed capabilities - creating, moving, coping, deleting, renaming, listing directories and files
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
http://www26.brinkster.com/mvark/scramble.html is my attempt at rot N encryption similar to rot13 encryption in which each char of submitted text is replaced by the 13th char ahead of it. to decode the encrypted text, u need to provide the negative value of the number u used to encrypt. the instructions to use the app are on the page itself. it uses javascript and works with ANY [?] user specified number.
i could not conclusively arrive at
1] the largest number that can be used
2] why certain characters don't show up properly on decryption while
other characters do. for instance character 'i' when encrypted with
number 55 generates a
char which when decrypted back with -55 does'nt give back 'i'
To take corrective action and convert this into an article I look forward to any feedback on this....
this is the function that does the encryption/decryption
function scramble(num){
ascram= new Array();
bscram= new Array();
scram=document.myform.original.value;
ascram=scram.split('');
for (itemp=0;itemp
|
|
|
|
|
The rot N algorithm is one of the oldest methods to encrypt text (maybe 3000 years old). Take the english alphabet for eaxample, which has 26 characters.
If you move every character 5 digits above your 'a' would become an 'f'. Easy. Now what about the 'v'? Adding 5 digits to 'v' would result in the 27th character of your alphabet, wich is not defined. Now how can you solve this? Quite easy, because you moved the 'a' five digits up, you get a space of 5 digits at the beginning of your alphabet, so all shifted characters above 26 resume at the beginning of the alphabet.
Every ASCII character has 256 possible values, so you have to set the cutting edge to 256.
This function rotates your text n wise:
<nobr>function rot(text, n)
{
var result = "", character, position;
n = (n % 0xFF < 0) ? (0xFF + n % 0xFF) : (n % 0xFF); // rotating -10 is the same as rotating +245
for (position = 0; position < text.length; position++)
{
character = text.charCodeAt(position);
character = (character + n) % 0xFF;
result += String.fromCharCode(character);
}
return result;
}
I wonder how you get an 'a' by adding something to 'i'. 'a' has the value 97 and 'i' the value 105?!
Ok, after sleeping over it twice I found 2 errors in my first try:
1. Negative n values, that resultet in a character value < 0 created garbage.
2. Numbers > 255 (0xFF) could also create problems.
Both fixed.
|
|
|
|
|
Congrats!!!
That was the most visually pleasing reply I have ever seen...
I'm now officially jealous...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Thanks !
|
|
|
|
|
Question:
Why is it such a bad thing to keep my connection string inside any *.php file...??? I've read from differ sources that so long as your database password/username are used inside PHP and your webserver is setup correctly this posesses no problems... (assuming because any PHP is exeuted on the server before being sent to the browser as PLAIN HTML?). However I have also read that you should store your database connection routines in an external PHP file somewhere other than your docroot and include into your main PHP code using require() or include()
What the hell does that mean...??? my doc root I am assuming is the directory on the server which is mapped to my IP/domain name???
example:
home/domain/mainwebsite_html
home/domain/mainwebsite_bin
However I don't think I can transfer files anywhere other than child folders I create or in the two listed above...or can I...??
If I FTP'ed a file under just home/ would this be considered somewhere other than docroot..?? if so why is this the safer method...??
Thanx in advance
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey wrote:
If I FTP'ed a file under just home/ would this be considered somewhere other than docroot..??
Yes. On a Unix box running Apache, you may see something like www , public_html , etc. where the actual document root is. It's rarely the same as your home directory for a virtual domain.
Hockey wrote:
if so why is this the safer method...??
Because it's not publicly accessible to everyone - which has to be done in order for web pages to show up in the browser.
If you can admin the system on your own, I would suggest keeping everything related to your webpage in the document root, however, to make it easier to move around. Create a "passwd" subdirectory and chmod that sucker to 750 and put the include file in there and chmod it to 640.
Note that the user Apache/PHP runs as will affect its access. Apache may be ran as the user nobody , or something similar. Which means there's a chance it might not have access to that folder you just created. So, either chgrp the "passwd" directory you created or change the user/group combo that Apache/PHP runs in - if it doesn't match.
If you can't admin the system, then just keep it outside of the document root as a quick fix. This still will stop anyone from the web from seeing it.
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
any 1 have idea how too use the tree view in asp
i want too show all the files in tree view
and when the user click on any file open
the file
how can i use tree view in asp
looking forward for reply
|
|
|
|