Forum closed. New forum available at http://community.wymeditor.org/

Any integration example using ASP.Net ?

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Any integration example using ASP.Net ?

Postby Pierre B on Mon Jul 06, 2009 12:32 pm

Hello,

Does anyone have an integration example using ASP.Net 2.0 +

I can't get it work with such platform.

Regards
Pierre B
 
Posts: 2
Joined: Mon Jul 06, 2009 12:30 pm

Re: Any integration example using ASP.Net ?

Postby gudski on Wed Jul 22, 2009 1:01 pm

Hi,

I assume you're having problem of getting the value from your textarea upon posting (postback) and the trick is to add the css-class "wymupdate" to your submit button.
Here's a simple example of how you get it to work:

First of you need to reference the script:
Code: Select all
<head>
   <script type="text/javascript" src="/Scripts/jquery.min.js"></script>
   <script type="text/javascript" src="/Scripts/wymeditor/jquery.wymeditor.min.js"></script>
</head>


Put this in your aspx or ascx:
Code: Select all
<script type="text/javascript">
    jQuery(document).ready(function()
    {
        jQuery('#<%= myTextarea.ClientID %>').wymeditor();
    });
</script>
<textarea runat="server" id="myTextarea" name="myTextarea" ></textarea>
<asp:Button runat="server" ID="myButton" CssClass="wymupdate" OnClick="myButton_Click" Text="Save" />
<asp:Label runat="server" ID="Result" />


And in code-behind we print the value from the editor to verify that it works:
Code: Select all
protected void myButton_Click(object sender, EventArgs e)
{
   Result.Text = myTextarea.Value;
}


Regards,
Daniel
gudski
 
Posts: 1
Joined: Wed Jul 22, 2009 12:14 pm

Re: Any integration example using ASP.Net ?

Postby Trumbun on Thu Jul 23, 2009 3:01 pm

Hi, David thanks for you replay but I am still having Problems. The Interface isn't loading in my asp.net page

Code: Select all
    <script src="/wymeditor/jquery.wymeditor.min.js" type="text/javascript"></script>
    <script type="/text/javascript" src="jquery/jquery.js"></script>

    <script type="text/javascript">
    jQuery(document).ready(function()
    {
        jQuery('#<%= myTextarea.ClientID %>').wymeditor();
    });
    </script>


</head>
<body>
    <form id="form1" runat="server">
    <div>
        <textarea runat="server" id="myTextarea" name="myTextarea" ></textarea>
        <asp:Button runat="server" ID="myButton" CssClass="wymupdate" OnClick="myButton_Click" Text="Save" />
        <asp:Label runat="server" ID="Result" />
    </div>
    </form>


That is my code but the editor is not showing.
Trumbun
 
Posts: 2
Joined: Thu Jul 23, 2009 2:59 pm

Re: Any integration example using ASP.Net ?

Postby jamesjohn09 on Fri May 28, 2010 10:14 am

Thanks gudski. I was also looking for the same. Thanks for helping us.
jamesjohn09
 
Posts: 1
Joined: Fri May 28, 2010 10:02 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 5 guests

cron