Hello Admin,
Well I am a newbie so it might possible that I might be unable to search what i needed..
Actually I needed a feature or want help in revealing feature. with RAD Edit
I want to read external html file in rad edit and want to save data in same file when a button click event fired....
sorry for poor english
code below i tried
but does not getting any result
Please Help me out
Well I am a newbie so it might possible that I might be unable to search what i needed..
Actually I needed a feature or want help in revealing feature. with RAD Edit
I want to read external html file in rad edit and want to save data in same file when a button click event fired....
sorry for poor english
code below i tried
using System.Text; |
using System.IO; |
public partial class wm_editor : System.Web.UI.Page |
{ |
string qs = ""; |
string filepath = ""; |
protected void Page_Load(object sender, EventArgs e) |
{ |
qs = Request.QueryString["e"]; |
if (qs == "cdtls") |
{ |
string add = "contactus.htm"; |
filepath = Server.MapPath(add); |
RadEditor1.Content = ReadFile(filepath); |
// edit contact details |
} |
} |
public string ReadFile(string path) |
{ |
if (System.IO.File.Exists(path)) |
{ |
System.IO.StreamReader sr = new System.IO.StreamReader(path); |
return sr.ReadToEnd(); |
} |
else |
{ |
return string.Empty; |
} |
} |
protected void btnupd_Click(object sender, EventArgs e) |
{ |
System.IO.StreamWriter externalfile = new System.IO.StreamWriter(filepath, false, Encoding.UTF8); |
externalfile.Write(RadEditor1.Content); |
} |
} |
but does not getting any result
Please Help me out