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

Did you know?Explore Trending and Topic pages for more stories like this.

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

Schedule editor
Hi,

I have a question related to Schedule editor.
If we schedule a BLS for every 30

Best PHP Documentation generator
Hello guys!

I would like to hear from you what is the best PHP documentation generator. Perso

removing space from the end of a variable
i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0m

Baffled by Undefined Index in Simple Array: Please Help!
Hello. I have a form which posts an array to this script. However, I can't seem to access the values

Linking with Foreign Keys
I have been getting an erro when I try and link:

create table Faculty_Specialty (I_Name v

Sql and php order list script problems
Hi im having a few problems with trying to get the coding right on a orders list ive done (or trying

GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.

I have a

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on diff

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

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