How to reach a specific folder


How to reach a specific folder in my webuser’s computer.I want when a user click a link, my asp page have to go a spesific folder

is there any ocx or dll to reach webuser’s computer?

ocx came from Microsoft on MSN Space. when user accept activex, it reads our harddisk to add pitcures. There must have been an ocx. I have to find or I will die

no, u can not do it

You can make an ocx yourself, but it works on IE only.

with the using of FSO (File System Object), u can read a file

Code:

<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile("C:/Documents and Settings/username/blabla.txt", 1)
Response.Write(f.ReadAll)
f.Close
Set f=Nothing
Set fs=Nothing
%>
Browsers don't allow this due to user's security settings. Firefox and opera strictly forbid this, while IE uses security zone to enforce the permissions given to web page.

Code:
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile("C:/Documents and Settings/username/blabla.txt", 1)
Response.Write(f.ReadAll)
f.Close
Set f=Nothing
Set fs=Nothing
%>

thats for the server that hosts your site or for client side

that's for server side.

convert ASP page to PDF


Hi,

Is there a way to convert ASP page to PDF. I want to convert my ASP page to PDF when I give print this page option.

thanks

pdf995 is a free prog that works as a virtual pdf printer

There is one way to convert any file (text or doc or htm or anyother) is to install a virtual printer and select it as a printer while printing, u will be able to save it as PDF file..

Try Persits Software Inc., which has a component related about online converting to PDF

Yes, u r right tertius. I have used a few of the Persits Software Inc components.

send the data from forms to emails


hello,
just a newbie in web development, also in ASP and PHP.
i just wanna ask how to send the data gathered from forms to emails?

Plz. help

Here is a php script that will send any form information to an e-mail address

Code:

if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}
$message = "";
while(list($key,$value) = each($_POST)){if(!(empty($value))){$set=1;}$message = $message . "$key: $valuenn";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}
$message = stripslashes($message);
$to = "yourmail@yourdomain.com";
$subject = "Your Subject";
if (mail($to, $subject, $message))

{
   echo("<h1>Thank You</h1>");

}
web host support different types of DLLs that are used for send email.

Yes steve
 
 Windows NT - 2000 support CDONTS by default, Windows 2000 and 2003 support CDOSYS by default. Many providers support CDONTS on 2003 as well as other objects such as ASPEmail, Jmail and others.Code:
Code:
if ($_SERVER['REQUEST_METHOD'] != "POST"){exit;}
$message = "";
while(list($key,$value) = each($_POST)){if(!(empty($value))){$set=1;}$message = $message . "$key: $valuenn";} if($set!==1){header("location: $_SERVER[HTTP_REFERER]");exit;}
$message = stripslashes($message);
$to = "yourmail@yourdomain.com";
$subject = "Your Subject";
if (mail($to, $subject, $message))

{
   echo("<h1>Thank You</h1>");

Thanks stevon but have another question...
 
 How do we email multiple fields using PHP?
 For example, in here mail($to, $subject, $message), you are only allowed one variable: $message. What if your form contains, say, 4 variables that need to be emailed.

Try this code, I Hope it will help You.
Code:
$message = "The following data subimitted: n
variable1: ".$var1."n
"variable2: ".$var2."n
"variable3: ".$var3."n
"variable4: ".$var4."nn Thank You";

$to = "yourmail@yourdomain.com";
$subject = "Your Subject";
if (mail($to, $subject, $message))

{
echo("<h1>Thank You</h1>");

}

making variables available to more than one page


I have been using the post method, but that only works for one other page…how do I go about making variables available to more than one page?

U can not do it in ASP.NET but If you’re using ASP 3.0 there is way to do this is to use session variables, which is not too effective in my opinion.

for session variables – use the request.form method like this:

session(“your_session_variable”) = request.form(“your_form_variable”)

then whenever you want to reference that session variable throughout the remainder of the session, just call it like any other… for example

response.write session(“your_session_variable”)

source code of an ASP program


I m running ASP programs on my website. Will anybody be able to view the source code of an ASP program on the website?

How can we make it even more secure?

yes everyone can see your source code, If u want to hide it,use javascript and disable source code view

It is not possible to see the ASP code.

U r right Dolbz,it is Not possible to see the ASP code, but if your IIS configuration is incorrect or your hosting provider takes the right to run ASP on your domain then it’s possible

As long as you instruct the server to parse those files (as is by default), the source will never be available to regular visitors.

code to query active directory


Does anyone have any code to query active directory via an ASP classic application. Basically, I want the application to verify that the user is logged into the network, and simply return the username they are using. This is done on a single signon network, so there is no interaction with the end user.

if you were using .NET 2.0 and Visual Studio 2005 you could generate a managed class from the Active Directory WMI provider to easily access the AD schema.

asp code for footer link


Hi all,

I m newbie in ASP.
I just wanted to add my main page link at the footer of every internal page of the site but couldnt understand the asp code and am stuck in it.
kindly help me

you will either have to edit every page, or put This include code at the bottom of every page.

Code:
<!--#include virtual="pagenamehere.asp"-->
Then create the pagenamehere.asp page with the footer content you require.

modify an XML file in ASP.net


Hey,

Is there any way to modify an XML file in ASP.net?

Sure, look at the XmlDocument class (it is very helpful for modifying XML files).

Namely all the .NET Framework XML classes include innovations that offer convenience, better performance, and a more familiar programming model etc. than the older industry standards such as DOM, XPath, XSD, and XSLT.

picture path into the database


how do i upload a picture path into the databae and display it out ??? pls help me. .

when uploading it you are presumably storing them in a predefined folder and therefore simply store the path relative to the root in the db with the file name or alternatively if they are all in a single location then there is only a need to store the filename as the path will be the same in all cases.

so you need to insert into db pictdure path or actually upload a picture via a form ?

download/read xml files from another website using asp


Is there any way to download/read xml files from another website using asp??

can be done client-side now with the ever-popular AJAX…

Or you can also write a COM obj to scrape another page/download file, etc..

look up the XMLHTTPRequest Object