1) Javascript function
function SetDocumentEditorSrc(WrkID) {
__doPostBack('<%= btnSetRadEditorContent.UniqueID %>', WrkID);
}
2) Button Click Event
protected void btnSetRadEditorContent_Click(object sender, EventArgs e)
{
String fileId = Request["__EVENTARGUMENT"]; // parameter
if (!String.IsNullOrEmpty(fileId))
{
String convertedContent = "";
RxOffice.BLL.Document document = new RxOffice.BLL.Document();
document.SetRadEditorContent(Convert.ToInt32(fileId));
if (!String.IsNullOrEmpty(convertedContent))
{
RadEditor1.Content = convertedContent;
}
}
//string filePath = Server.MapPath("~/SampleInitialContent.docx");
//byte[] fileBinaryData = File.ReadAllBytes(filePath);
//string convertedContent = Functions.ConvertDocxToHtml(fileBinaryData);
}
function SetDocumentEditorSrc(WrkID) {
__doPostBack('<%= btnSetRadEditorContent.UniqueID %>', WrkID);
}
2) Button Click Event
protected void btnSetRadEditorContent_Click(object sender, EventArgs e)
{
String fileId = Request["__EVENTARGUMENT"]; // parameter
if (!String.IsNullOrEmpty(fileId))
{
String convertedContent = "";
RxOffice.BLL.Document document = new RxOffice.BLL.Document();
document.SetRadEditorContent(Convert.ToInt32(fileId));
if (!String.IsNullOrEmpty(convertedContent))
{
RadEditor1.Content = convertedContent;
}
}
//string filePath = Server.MapPath("~/SampleInitialContent.docx");
//byte[] fileBinaryData = File.ReadAllBytes(filePath);
//string convertedContent = Functions.ConvertDocxToHtml(fileBinaryData);
}
No comments:
Post a Comment