<Div> Help PLEASE!!!!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on a control that will act like a <Textarea> HTML Control that
will allow persistent data for postback. Problem is that the data will be
contained between the opening and closing <DIV> tag. Problem is there is no
Text property as there is with the <Textarea> tag. Does anyone know of any
means of grabbing the data between the div tag inorder to persist it? Will I
have to use a hidden input control? I have tried (unsuccessfully) the
InnerHTML Container control. Or Do I have to use a combination of both?
 
The client side property for grabbing the textarea is .value

document.getElementById('mytextarea').value

If you used a server side TextBox ASP.NET control and
set it's TextMode="MultiLine", then you access the value
via the .Text property.

Took both of these out of a working ASP.NET application.

Either of these being inside a DIV is irrelevant.
 
Basically, you need to get innerHTML property of the div and to pass it over
to the server. Using a hidden input seems to be a standard and simple
solution for that.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top