Hi<br />
<br />
I have write this code and it is working correctly on the Local host but when i upload it to website it give error that file cannot found on server. <br />
<br />
protected void Button1_Click1(object sender, EventArgs e)<br />
{<br />
if (!File.Exists(Server.MapPath(@"App_data\TextFiles\Text1.txt")))<br />
{<br />
File.Create(Server.MapPath(@"App_data\TextFiles\Text1.txt"));<br />
Label1.Text = "File Created";<br />
}<br />
else<br />
Label1.Text = "File Already Created";<br />
}<br />
<br />
I have write this code and it is working correctly on the Local host but when i upload it to website it give error that file cannot found on server. <br />
<br />
protected void Button1_Click1(object sender, EventArgs e)<br />
{<br />
if (!File.Exists(Server.MapPath(@"App_data\TextFiles\Text1.txt")))<br />
{<br />
File.Create(Server.MapPath(@"App_data\TextFiles\Text1.txt"));<br />
Label1.Text = "File Created";<br />
}<br />
else<br />
Label1.Text = "File Already Created";<br />
}<br />