Beloew is my code which i want to save some info the user key in to be saved to the file, how come i keep encountering Ioexception error after i debug and click on the save button..pls kindly adv..thks!!! i guess it has something to do with the filefolder but have absolutely no idea..
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace ASSISNMENTTT
{
public partial class Registeration : Form
{
public Registeration()
{
InitializeComponent();
}
private void Btn_Save_Click(object sender, EventArgs e)
{
// This is the button labeled "Save" in the program.
//
File.WriteAllText("C:\demo.txt", Tb_Admin.Text);
File.WriteAllText("C:\demo.txt", Tb_Name.Text);
File.WriteAllText("C:\demo.txt", Tb_Gender.Text);
}
}
}