Click here to Skip to main content
15,928,281 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRequiredFieldValidator Pin
krutika_mail28-Dec-06 4:03
krutika_mail28-Dec-06 4:03 
AnswerRe: RequiredFieldValidator Pin
Not Active28-Dec-06 5:13
mentorNot Active28-Dec-06 5:13 
AnswerRe: RequiredFieldValidator Pin
ednrgc28-Dec-06 8:42
ednrgc28-Dec-06 8:42 
Questionasp:Table vs. an HTML table Pin
RX Maverick28-Dec-06 3:29
RX Maverick28-Dec-06 3:29 
AnswerRe: asp:Table vs. an HTML table Pin
Not Active28-Dec-06 4:05
mentorNot Active28-Dec-06 4:05 
GeneralRe: asp:Table vs. an HTML table Pin
RX Maverick28-Dec-06 5:27
RX Maverick28-Dec-06 5:27 
QuestionHow to create a file watcher window service to look in a folder for new file?? Pin
garimajain_mca28-Dec-06 2:31
garimajain_mca28-Dec-06 2:31 
AnswerRe: How to create a file watcher window service to look in a folder for new file?? Pin
GaryWoodfine 28-Dec-06 11:58
professionalGaryWoodfine 28-Dec-06 11:58 
try wrapping the part that you open your stream reader in a using block,
Check out here

Also reading your code, I'm not quite sure where you the variable FileName get's it's values from?

the code is quite messy could do with some tidying up, tyhat way you could probably find the bug!

I tried something like this and it works fine for me?
 StringBuilder sbXML = new StringBuilder();<br />
                string fPath = e.FullPath.ToString();<br />
                using(FileStream fStream = new FileStream(fPath,FileMode.Open,FileAccess.Read,FileShare.Read))<br />
                using(StreamReader sr = new StreamReader(fStream))<br />
                {<br />
                    while( sr.Peek() > -1)<br />
                    {<br />
                        sbXML.Append(sr.ReadLine());<br />
                    }<br />
                }<br />
<br />
                FileInfo fi = new FileInfo(e.FullPath);<br />
                fi.Directory.CreateSubdirectory("updated");<br />
                File.Copy(e.FullPath, fi.DirectoryName + "\\Updated\\" + fi.Name, true);<br />
                fi.Delete();<br />
<br />





Kind Regards,
Gary


My Website || My Blog || My Articles

GeneralRe: How to create a file watcher window service to look in a folder for new file?? Pin
garimajain_mca28-Dec-06 21:18
garimajain_mca28-Dec-06 21:18 
GeneralRe: How to create a file watcher window service to look in a folder for new file?? Pin
GaryWoodfine 29-Dec-06 10:15
professionalGaryWoodfine 29-Dec-06 10:15 
QuestionBorder Color Pin
248912828-Dec-06 2:14
248912828-Dec-06 2:14 
AnswerRe: Border Color Pin
Venkatesh Mookkan28-Dec-06 17:46
Venkatesh Mookkan28-Dec-06 17:46 
GeneralRe: Border Color Pin
248912828-Dec-06 19:39
248912828-Dec-06 19:39 
GeneralRe: Border Color Pin
_AK_28-Dec-06 20:31
_AK_28-Dec-06 20:31 
JokeRe: Border Color Pin
Venkatesh Mookkan28-Dec-06 21:15
Venkatesh Mookkan28-Dec-06 21:15 
QuestionASP.NET Pin
analyst200128-Dec-06 1:28
analyst200128-Dec-06 1:28 
GeneralRe: ASP.NET Pin
Eduard Keilholz28-Dec-06 1:41
Eduard Keilholz28-Dec-06 1:41 
QuestionWeb service, adding a web reference to a web service over the internet Pin
steve_rm28-Dec-06 1:14
steve_rm28-Dec-06 1:14 
QuestionEncrypting files on server side Pin
Rankor2028-Dec-06 0:47
Rankor2028-Dec-06 0:47 
AnswerRe: Encrypting files on server side Pin
Eduard Keilholz28-Dec-06 1:33
Eduard Keilholz28-Dec-06 1:33 
GeneralRe: Encrypting files on server side Pin
Rankor2028-Dec-06 2:12
Rankor2028-Dec-06 2:12 
GeneralRe: Encrypting files on server side Pin
Eduard Keilholz28-Dec-06 2:19
Eduard Keilholz28-Dec-06 2:19 
Questionproblem with timer Pin
MissionSuccess28-Dec-06 0:22
MissionSuccess28-Dec-06 0:22 
AnswerRe: problem with timer Pin
Eduard Keilholz28-Dec-06 1:35
Eduard Keilholz28-Dec-06 1:35 
GeneralRe: problem with timer Pin
MissionSuccess28-Dec-06 1:42
MissionSuccess28-Dec-06 1:42 

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.