TinyMCE / Ajax Postback Problem


Posted on 16th Feb 2014 07:03 pm by admin

Hiya all,

I have a page which loads the TinyMCE editor. On the postback I obviously want to fetch that data again but the value stays empty. Strangely enough, when I disable the "updatepanel" control I do get the value. Now, this leaves me puzzled.Here's the code (c# from code behind) for the page that reads and writes the TinyMCE text:1 private Question _question;
2 3 protected Question Question
4 {
5 get {
6 if(_question == null)
7 _question = GuiLayer.SelectQuestion(Convert.ToInt32(Request.QueryString["id"].ToString()));
8 return _question;
9 }
10 }
11
12 protected void Page_Load(object sender, EventArgs e)
13 {
14 if (!Page.IsPostBack)
15 {
16 txtTekst.Text = Server.HtmlDecode(Question.AnswerPrefab);
17 DataBind();
18 }
19 }
20 21 protected void btnsaveQuestion_Click(object sender, EventArgs e)
22 {
23 if (Page.IsValid)
24 {
25 ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "init", "InitTiny();", true);
26 Question.AnswerPrefab = Server.HtmlEncode(txtTekst.Text);
27 GuiLayer.UpdateQuestion(_question);
28 }
29 }
Here's the corresponding asp.net page: 1
2
3
23

ManageQuestion


24


25

26
27
28
29
30


any help would be appreciated

No comments posted yet

Your Answer:

Login to answer
108 Like 8 Dislike
Previous forums Next forums
Other forums

How to use Ajax to verify data on a DB ?
Hello everyone, well i want to know how to check a value if it exists or not on a Data base and capt

GIS appliction help
I found some tutorials in the internet to develop a map application I don't want to use google maps

Stuck with preg_replace
Hi,

I'm trying to use preg_replace to remove part of the IP address submitted using a form on

subtract 1 from value entered in text field
Hi

How do I subtract 1 from the vaue entered into a text field?

Thanks

Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,

I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.

CALL FUNCT

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash