Click here to Skip to main content
15,891,529 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDataset and XML Pin
Farraj16-Apr-10 7:05
Farraj16-Apr-10 7:05 
AnswerRe: Dataset and XML Pin
Estys18-Apr-10 0:27
Estys18-Apr-10 0:27 
GeneralRe: Dataset and XML Pin
Farraj20-Apr-10 9:34
Farraj20-Apr-10 9:34 
QuestionFile uploader Pin
Morgs Morgan16-Apr-10 4:32
Morgs Morgan16-Apr-10 4:32 
AnswerRe: File uploader Pin
Priya Prk16-Apr-10 5:28
Priya Prk16-Apr-10 5:28 
AnswerRe: File uploader Pin
Viral Upadhyay16-Apr-10 8:24
Viral Upadhyay16-Apr-10 8:24 
AnswerRe: File uploader Pin
Peace ON16-Apr-10 21:10
Peace ON16-Apr-10 21:10 
GeneralRe: File uploader Pin
Morgs Morgan16-Apr-10 22:38
Morgs Morgan16-Apr-10 22:38 
Hey thanks guys for ya reps, well i wish i would xplain this better,
Here is a piece of code:
below 'files' is the name of my file uploader
HttpPostedFile myFile = files.PostedFile;// Get a reference to PostedFile object
string strFilename = Path.GetFileName(myFile.FileName);//path of a file
if (strFilename != "")//check if a user has selected a file
{
    string[] lines = File.ReadAllLines(strFilename);//will read all lines from a file
                   //here a runtime error fires saying the file path was not found
}

Reason: As anyone one else knows, when you choose browse on a file uploader, you can only select a file if it is present in the dialog box that opens.
So if I select a file in my working directory, it works ok but if i select a file 'Outside' my working directory then I receive the error above(file not found).
E.g my working directory is: C:\MyProject\SMS Send\contacts.txt this works
and if I choose: C:\Documents and Settings\Morgan\Desktop\testing.txt this will give a FileNotFound exception,
and when i look at this exception it is pointing to:C:\MyProject\SMS Send\testing.txt which is my working directory. I don't quiet understand why it is searching for the file from my working directory..
Please help
Thanks
Mor
GeneralRe: File uploader Pin
www.Developerof.NET18-Apr-10 20:26
www.Developerof.NET18-Apr-10 20:26 
GeneralRe: File uploader Pin
Morgs Morgan18-Apr-10 21:57
Morgs Morgan18-Apr-10 21:57 
Questionwhat does the the following C# code mean? an class="smallblack">Application[“mydata”]=”mydata”; Pin
reogeo200816-Apr-10 4:07
reogeo200816-Apr-10 4:07 
AnswerRe: what does the the following C# code mean? an class="smallblack">Application[“mydata”]=”mydata”; Pin
Not Active16-Apr-10 4:15
mentorNot Active16-Apr-10 4:15 
Questionasp.net program to generate search engine like google Pin
sameer1a2b3c16-Apr-10 3:05
sameer1a2b3c16-Apr-10 3:05 
AnswerRe: asp.net program to generate search engine like google Pin
Sandeep Mewara17-Apr-10 3:28
mveSandeep Mewara17-Apr-10 3:28 
GeneralRe: asp.net program to generate search engine like google Pin
sameer1a2b3c17-Apr-10 18:09
sameer1a2b3c17-Apr-10 18:09 
QuestionHAving problem in urlrewriter.net for the rediret page and for url Pin
Member 438775716-Apr-10 2:49
Member 438775716-Apr-10 2:49 
Questionget the data of PDF to XL Sheet Pin
raghvendrapanda16-Apr-10 1:22
raghvendrapanda16-Apr-10 1:22 
AnswerRe: get the data of PDF to XL Sheet Pin
adkalavadia16-Apr-10 23:22
adkalavadia16-Apr-10 23:22 
QuestionPrint Option On Report Viewer Pin
rhtbhegade16-Apr-10 0:52
rhtbhegade16-Apr-10 0:52 
Answer[Repost] Re: Print Option On Report Viewer Pin
Sandeep Mewara16-Apr-10 1:57
mveSandeep Mewara16-Apr-10 1:57 
QuestionWhat kind of authentication to use? Pin
Priya Prk16-Apr-10 0:31
Priya Prk16-Apr-10 0:31 
AnswerRe: What kind of authentication to use? Pin
Not Active16-Apr-10 1:53
mentorNot Active16-Apr-10 1:53 
GeneralRe: What kind of authentication to use? Pin
Priya Prk16-Apr-10 2:22
Priya Prk16-Apr-10 2:22 
GeneralRe: What kind of authentication to use? Pin
Not Active16-Apr-10 2:25
mentorNot Active16-Apr-10 2:25 
Questionmessage box Pin
luckydear16-Apr-10 0:09
luckydear16-Apr-10 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.