1.11M Members

Giving space

 
0
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
public partial class _Default : Page
{
    protected void Page_Load(object sender, EventArgs e)
    {


    }
    protected void Button_Click(object sender, EventArgs e)
    {
        string Filename = HttpContext.Current.Server.MapPath("~/textFile.txt");

        if (!File.Exists(Filename))
        {
            StreamWriter txtFile = File.CreateText(Filename);
            txtFile.Close();
            txtFile = File.AppendText(Filename);
            txtFile.WriteLine(Textbox.Text,"  ");
            txtFile.Close();
        }
        else
            File.AppendAllText(Filename, Textbox.Text);

        NewName.Text = "Text is saved";
        }
    }

unable to give space automatically after entering text to file

 
0
 

unable to give space automatically after entering text to file

Can you explain what you mean by this?

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: