User Profile

Collapse

Profile Sidebar

Collapse
koneyji
koneyji
Last Activity: May 20 '10, 11:54 PM
Joined: Mar 26 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • koneyji
    started a topic How to create a file from textbox file name

    How to create a file from textbox file name

    I need to read a file from a text box and create a new file using file.create command and the new file should have.enc extension.

    I tried but can't get it to work.

    the program goes like this
    Code:
     BinaryReader br = new BinaryReader(File.Open(textBox1.Text, FileMode.Open));
    
    BinaryWriter bw = new BinaryWriter(File.Create()) // in this line i need to create a file from textBox1.Text having differentextension.
    See more | Go to post
    Last edited by Niheel; May 21 '10, 12:39 AM. Reason: spelling, punctuation, added code tags, made more readable

  • koneyji
    replied to error in sending file
    thank you

    the error is in
    StreamReader fIn = new StreamReader(pa th);

    it says
    {"Access to the path 'D:\\datafiles\ \data' is denied."}

    i think it is a folder privacy issue..
    See more | Go to post

    Leave a comment:


  • koneyji
    replied to error in sending file
    can't find the exactly where the error is?
    i think the error is somewhere here
    Code:
     try
                {
                    StreamReader fIn = new StreamReader(path);
                    string nextLine;
                    Console.WriteLine("sending file");
                    nextLine = fIn.ReadLine();
                    while (nextLine != null)
                    {
    ...
    See more | Go to post
    Last edited by tlhintoq; Mar 27 '10, 05:43 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]

    Leave a comment:


  • koneyji
    started a topic error in sending file

    error in sending file

    hi i have following code to send file and its giving file io error

    Code:
    namespace client_server
    {
        class Program
        {
            static void Main(string[] args)
            {
                IPAddress ip = IPAddress.Parse("127.0.0.1");
                TcpListener tcp = new TcpListener(ip, 1234);
                tcp.Start();
                Console.WriteLine("server started");
    ...
    See more | Go to post
    Last edited by tlhintoq; Mar 26 '10, 06:51 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]
No activity results to display
Show More
Working...