Solved

TINYMCE Textbox not updating

Posted on 2012-03-21
6
712 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

717 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