[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

TINYMCE Textbox not updating

Posted on 2012-03-21
6
Medium Priority
?
721 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
Industry Leaders: 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

649 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