|
|
Hello everybody,
Hai i am asking your help.in my project i want to read a folder and list the names of the files in this folder can anybody help me to solve this issue...
regards alex.
|
|
|
|
|
Like this, simple example
DirectoryInfo MyDirectory - new DirectoryInfo(Server.MapPath("images"));
foreach(FileInfo Fr in MyDirectory.GetFiles())
{
Response.Write(Fr.Name); //<--- Intellisense will give you all possibles
}
|
|
|
|
|
|
Search this forum or google. This is a very simple task that has been discussed many times.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
CWIZO
this is what the forum is for though. If so simple, I would have thought answering the question would be more logical and quicker for the person asking the question. Thus keeping true to the point of a Q&A Forum.
Tis only my opinion though.
|
|
|
|
|
I agree with you totaly. But, why would one west his time to repeat something over and over again if that information is so simple to obtain? If something was discussed so many times before there is no need to go over it again. That is why this forum has a search page and that is why there is google (and other search engines).
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
go through the code ull get the solution
using System;
using System.IO;
namespace ConsoleApplication1
{
public class sysio2
{
public static void Main()
{
FileInfo[] F;
DirectoryInfo D = new DirectoryInfo(@"c:\abc");
F =D.GetFiles("*.*");
foreach(FileInfo i in F)
{
Console.WriteLine(i);
}
Console.ReadLine();
}
}
}
BY
pradeep reddy.
-- modified at 5:17 Friday 1st September, 2006
Pradeep Reddy
|
|
|
|
|
Hi all,
I am using the below code to send an test mail, the code works in local system, when i upload the code to our server it shows some error,Transport failed in its connection to the server. A not managed exception occurred at the time of the execution of the current Web request. Information relating to the origin and the site of the exception can be identified by using the trace of the pile of exception below.[ HttpException (0x80004005): Impossible to reach the object ' CDO.Message'.
This is the code whc i used.
msg.Subject = "subject"
msg.Priority = MailPriority.High
msg.To = xxxx@aaaa.com
msg.From = bbb@fgfgf.com
msg.BodyFormat = MailFormat.Html
msg.Body = body--------------------------> this variable has the collection of string and html tags
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(msg)
|
|
|
|
|
when you say you uploaded it to your server I presume this is a shared hosting account. In such case the value for your SmtpMail.SmtpServer would be
smtp.yourdomain.com
Localhost would be as you said, on your local server or if you have a dedicated server.
|
|
|
|
|
Hello Friends,
I am developing an asp.net application with c#(.net framework 1.1).All my validation controls are working in my local machine, but after uploading them to remote server non of my validation contols are working in both IE & Mozilla.
Plese tell me where the problem lies.
Thanking You
pradeep reddy
Pradeep Reddy
|
|
|
|
|
Define "not working".
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
When you have uploaded your files are you sure there is no conflict of versions?
|
|
|
|
|
check whether required javascript files(related to validation controls) are available on server or not.
Best Regards,
Apurva Kaushal
|
|
|
|
|
thank you i got the solution.
Pradeep Reddy
|
|
|
|
|
always welcome.. BTW what was the problrm?
Best Regards,
Apurva Kaushal
|
|
|
|
|
i forgot to place asp_client folder in server root
Pradeep Reddy
|
|
|
|
|
And that is where all you validation javascripts files are...
Best Regards,
Apurva Kaushal
|
|
|
|
|
|
Hi! i want to get all logical drives of a client computer using java script.
how is it posssible?
|
|
|
|
|
I am no so sure but probably it is not possible to get the client's system logical drives. In normal c# you can get that by using Environment.GetLogicalDrives().
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hello Friends,
I am developing an asp.net application with c#(.net framework 1.1).All my validation controls are working in my local machine, but after uploading them to remote server non of my validation contols are working in both IE & Mozilla.
Plese tell me where the problem lies.
Thanking You,
Prabir
|
|
|
|
|
|
How to send an e-mail using ASP.net?
|
|
|
|
|