Loading ...
Sorry, an error occurred while loading the content.

52333Get Editor from ASP.NET Code behind

Expand Messages
  • n3sh0n
    Jan 8, 2010
    • 0 Attachment
      Hi experts,

      I've created a YUI Editor with the following code taken from the Editor samples:

      <textarea name="msgpost" id="msgpost" cols="50" rows="10"> </textarea>

      var myEditor = new YAHOO.widget.Editor('msgpost' , {
      height: '300px',
      width: '522px',
      dompath: true, //Turns on the bar at the bottom
      animate: true

      });
      myEditor.render();

      My big question is how to access the value of the msgpost from code behind. I dont want to use the runat=server on the textarea control because my Yahoo Editor is created on the fly using javascript. what I'm looking is something like the following on the code behind:

      //this is on my code behind
      private void GetYahooValue()
      {
      Yahoo_Namespace.Editor myEditor=Page.Findcontrol["msgpost"];
      string s=myEditor.value;
      Response.Write(s);
      }

      Of course I dont have the Yahoo_Namespace and no dll to be referenced but the code must be somewhere on the page. Any thoughts?

      Hope its clear.
    • Show all 2 messages in this topic