vb.net to c#

N

nasirmajor

Dear all, just a single line problem

this vb.net line works alright

fp = File.CreateText(Server.MapPath(".\UploadArabic\") & "test.txt")

but how to write it in c#?

following line is working alright

fp=File.CreateText(Server.MapPath("Rand2.txt"));

but not accepting (".\UploadArabic\")
 
V

Vadivel Kumar

Instead of this (".\UploadArabic\") change to (@".\UploadArabic\").
I mean, put @ symbol before the quotation. It should work.

Let us know if you have any issues in solving this.
 
N

nasirmajor

Dear Myself
do it this way

fp = File.CreateText(Server.MapPath("UploadEng/react2.txt"));

you get worried to early.
try harder baby
regards
yourself
 
G

Guest

fp = File.CreateText(Server.MapPath(".\UploadArabic\") & "test.txt")

What about:
fp = File.CreateText(Server.MapPath(".\UploadArabic\") + "test.txt")

Or perhaps it doesn't like the backslashes?
fp = File.CreateText(Server.MapPath("\.\\UploadArabic\\") + "test.txt")
 
N

nasirmajor

Thankyou all
i saw your answers bit late
however i did it with this
fp = File.CreateText(Server.MapPath("UploadEng/react2.txt"));
and it worked
thankyou all again
regard
nasir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top