htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
htmlarea in editItemTemplate (ASP.NET)


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


gape
New User

Dec 11, 2004, 6:07 AM

Post #1 of 2 (2583 views)
Shortcut
htmlarea in editItemTemplate (ASP.NET) Can't Post

has anybody got htmlarea to work inside the EditItemTemplate of a Datagrid or DataList? I have looked at some previous posts and tried them.

I have got htmlarea to appear and edit correctly in datalist's edit mode, but the problem comes when I am retrieving the updated values in the textarea after the user presses the "update" button.

When I retrieve the .Text value from the textarea, the original text remains, i.e. the changes are not there.

Maybe this will provide more info:

ASP.NET generates a textarea with name attribute and id attribute being different. eg:

<textarea name="dl_journal:_ctl0:txt_editContent" rows="10" cols="90" id="dl_journal__ctl0_txt_editContent" style="width:100%;"></textarea>

I create htmlarea using:

<script type='text/javascript'>
_editor_url = '/htmlarea/';
_editor_lang = 'en';
</script>

<!-- load the main HTMLArea file -->
<script type='text/javascript' src='/htmlarea/htmlarea.js'></script>

<script type='text/javascript' defer>
var editor = new HTMLArea('dl_journal__ctl0_txt_editContent');
editor.config.statusBar = false;
editor.config.imageURL ='/images/';
editor.generate();
</script>


I suspect the different name and id attribute generated by ASP.NET could be the problem... anyone knows how to solve this?

thks in advance!


jtwright
New User

Jan 12, 2005, 4:36 PM

Post #2 of 2 (2458 views)
Shortcut
Re: [gape] htmlarea in editItemTemplate (ASP.NET) [In reply to] Can't Post

Give the textarea a regular name like this in your edititem on your aspx page:


Code
<textarea name="FirstLine" id="FirstLine" cols="100"></textarea> 



Then in your code behind, access the value with code like this:


Code
textiwant = CType(e.Item.FindControl("textarea1"), HTMLTextArea).Value 


 
 
 


Search for (options)