How to retrieve a value in [TEXTAREA] in an aspx (add manually)

  • Thread starter Thread starter zoltix
  • Start date Start date
Z

zoltix

Hi,
How to retrieve a value in [TEXTAREA] in an aspx page?
Normally it is easy, drag and drops the textarea in aspx page and it is
work. But in this case, I generate the html code manually () and put as
literal html in the aspx page. How to do for retrieving the value in my
textarea without define a variable (runnat server) in c# code?

I thought this code retrieve all controls and value in all tag inside
the Form tag, it is not the case.

for(int i=0; i<Request.Form.Count;i++)
{ Response.Write(Request.Form+
"<br>"); Response.Write(Request.Form.Get(i)+
"<br>"); Response.Write(Request.Form.GetKey(i)+ "<br>");
}



Example: html
<form id="Form1" method="post" runat="server">
<TEXTAREA id="TEXTAREAcoucou" style="Z-INDEX: 101; LEFT: 559px;
POSITION: absolute; TOP: 211px" rows="2" cols="20">TEXTAREAcoucou
TEXTAREAcoucou</TEXTAREA>
</form>



Could you help me?

Bye bye
 
Hi,

You have to add the control to the page in the postback, the controls
generated dynamically needs to be recreated each time the page is submitted


cheers,
 
Back
Top