1,105,406 Community Members

Giving space

Member Avatar
muhammad.ibraheem_1
Newbie Poster
5 posts since Jul 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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

Member Avatar
pritaeas
mod_pritaeas
11,295 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,832 [?]
Skill Endorsements: 155 [?]
Moderator
Featured
Sponsor
 
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 three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: