?
Solved

TINYMCE Textbox not updating

Posted on 2012-03-21
6
Medium Priority
?
716 Views
Last Modified: 2012-03-27
Hi,

I have a textbox that is using TinyMce and it works fine, but when I enter in text and then click save it doesn't make it through to my SQL string to insert into the database.

Below is the code for my textbox

<asp:TextBox ID="txtArticle" Enabled="false" runat="server" Height="250px" TextMode="MultiLine" Width="600px"></asp:TextBox>

Then the code below is the code Im using in the codebehind

string ShortArticle = txtPlainText.Text;

string query1 = "UPDATE database SET shortArticle='" + ShortArticle + "' WHERE newsid='" + newsid + "'";

Any help would be greatly appreciated

Regards

Michael
0
Comment
Question by:hayward03
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 14

Expert Comment

by:dejaanbu
ID: 37748928
try this,

have a javascript function
<script type="text/javascript">
function UpdateTextArea() {                                     
            tinyMCE.triggerSave(false, true);
        }
</script>

Open in new window


call it before submitting,
<asp:Button ID="itheButton" runat="server" OnClientClick="UpdateTextArea();"  />

Open in new window

0
 

Author Comment

by:hayward03
ID: 37748960
Hi,

Thank you for your help, but this didnt work either...no error, but just didnt update.

Regards

Michael
0
 
LVL 14

Expert Comment

by:dejaanbu
ID: 37751676
your tinymce textbox name is  "txtArticle" or "txtPlainText" ?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:hayward03
ID: 37751707
Sorry the code is below:

<asp:TextBox ID="txtArticle" Enabled="false" runat="server" Height="250px" TextMode="MultiLine" Width="600px"></asp:TextBox>

string ShortArticle = txtArticle.Text;

string query1 = "UPDATE database SET shortArticle='" + ShortArticle + "' WHERE newsid='" + newsid + "'";
0
 

Accepted Solution

by:
hayward03 earned 0 total points
ID: 37751869
Hi,

This was me being DUMB as I just saw that I had textbox enabled="false"

Regards

Michael
0
 

Author Closing Comment

by:hayward03
ID: 37770355
I solved my own issue
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question