Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi There,
I am working on asp.net and I have used tiny mce editor in my aspx and one file upload control.On local host my page running fine, but when it is hosted on server
it shows me editor,fileupload it's fine but when file is upload my page get blanked.why?so pls reply me


Note-->
when tiny mce editor replace with Ajax Editor then it works fine on local host and on server then it is point out that the problem is of tiny mce editor.Due to Some peformace issue i don't want to use Ajax editor.
Posted

1 solution

Maybe you didn't assign the proper security to the folder for upload.

Other than that, without seeing your tinyMCE code, I'm as blind as a bat.
 
Share this answer
 
Comments
nira.parmar 22-Jul-12 1:44am    
This is my code on aspx page-->

<script src="tiny_mce/tiny_mce.js" type="text/javascript"></script>

<script type="text/javascript">

tinyMCE.init({
// General options
mode: "exact",
elements: "Editor1",
theme: "advanced",
height: "250",
width: "400",
// skin: "o2k7",
plugins: "pdw,safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount",
// Theme options
theme_advanced_buttons1: "pdw_toggle,|,undo,redo,|,removeformat,outdent,indent",
theme_advanced_buttons2: "cut,pastetext,pasteword,||,bullist,numlist,|,link,unlink,|,justifyleft,justifycenter,justifyright,justifyfull,fontselect,fontsizeselect",
theme_advanced_buttons3: "bold,italic,underline,|,forecolor,strikethrough,|,ltr,rtl,backcolor",
//theme_advanced_buttons4: "removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_source_editor_wrap: true,
pdw_toggle_on: 0,
pdw_toggle_toolbars: "2,3,4",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: false,
relative_urls: false,
remove_script_host: true,
document_base_url: "",
file_browser_callback: "filebrowser"


});
</script>

<asp:TextBox runat="server" ID="Editor1" ClientIDMode="Static" TextMode="MultiLine" Columns="50" Rows="10" Text="" Width="69px"/>

<asp:FileUpload ID="UplPicture" runat="server" />
<asp:ImageButton ID="imgPicsUpload" runat="server" ImageUrl="~/Buttonss/Ok.jpg" OnClick="imgPicsUpload_Click" />



.CS code-->

protected void imgPicsUpload_Click(object sender, ImageClickEventArgs e)
{
// HttpPostedFile UplPicture1 = Request.Files["UplPicture"];
if (true)
{
// int FileSize = UplPicture.FileBytes.Length;

int FileSize = UplPicture.PostedFile.ContentLength;
try
{

string filename = UplPicture.PostedFile.FileName;

if (FileSize <= 6048576)
{
string yyyy = Convert.ToString(DateTime.Now.Year);
string month = Convert.ToString(DateTime.Now.Month);
string day = Convert.ToString(DateTime.Now.Day);
string hour = Convert.ToString(DateTime.Now.Hour);
string sec = Convert.ToString(DateTime.Now.Second);
Random num = new Random();
int nn = num.Next(1000);
string gettype = System.IO.Path.GetExtension(this.UplPicture.PostedFile.FileName);
string filename1 = yyyy + "-" + month + "-" + day + "-" + hour + "-" + sec + "_" + nn + gettype;
// Image1.ImageUrl = FileUpload1.FileName;
if (Convert.ToInt32(ViewState["i2"]) == 0)
{
i = Convert.ToInt32(ViewState["i"]);
}
else
i = Convert.ToInt32(ViewState["i2"]);
ViewState["imagePath" + i] = "Uploaded_Images/" + filename1;
// ViewState["img" + i] = UplPicture.FileName;
ViewState["img" + i] = Path.GetFileName(UplPicture.PostedFile.FileName);
string filepath = Convert.ToString(ViewState["imagePath" + i]);
// UplPicture.SaveAs(Server.MapPath(("Uploaded_Images/") + filename1));
// Upl
jkirkerx 22-Jul-12 13:49pm    
I suspect that the tinyMCE works fine, but your working on the file upload part for image, Doc, pdf's.

I was just working on my ckEditor file browser, I wrote my own instead of purchasing the ckViewer.

So tinyMCE is just ckEditor, in which there is an image button that you can click, and a javascript popup will appear allowing you to upload an image file.

But you using the asp.net file upload control instead. I don't see how your going to insert the img tag into the editor pane, and allow for adjusting the size and alignment by the user.
jkirkerx 22-Jul-12 23:00pm    
Have you considered using the moxieimage?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900