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
8
Other forums
Echo multiple lines of html code
Hi guys,
I would like to know if there is a way to echo multiple lines of html codes.
Odd or Even
Inside of a while loop I need to echo several rows of info...easy enough.
In the loop (for th
Adding post count
How would I make it so everytime someone clicks submit on my form, their row in the database for the
need help in mysql_num_rows()
please tell me what i am doing wrong in this query. it displays this error
Code: Warning: mys
Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields
Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '
Code: [Select]preg_
Adding to an Int row in db
Hi, i have a database which houses all of the users of my site. One of the columns is for points whi
php title problem
Hi,
I am having a problem managing my page title with PHP.
Currently I have my <
Unable to retreve the values from Mysql Query
Hi,
Here is the php code that I have, Query is running properly in phpmyadmin and is resu
timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db u