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

user data not transferring to new page
I'm a PHP learner. After an index.php page, the user goes to a login.php page. Both pages seem to

Email to a friend script problems
I have this send-to-a-friend script with 2 issues:


1) When you open the form popup on a p

radio button reamains checked
Hello i'm trying to keep the state off my radio buttons so it shows which ones where clicked after t

Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:

2010-01-26 and 2010-05-30

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";

function get_nam

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

mysql VARCHAR acting like INT
Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column

want a code for uploading and downloading
i m trying to upload and download to my site..i need upload and download code ...i use a code for up

problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections

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