How to retrieve a value in [TEXTAREA] in an aspx page?
-
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"); Response.Write(Request.Form.Get(i)+ "
"); Response.Write(Request.Form.GetKey(i)+ "
"); } Example: htmlTEXTAREAcoucou TEXTAREAcoucou
Could you help me? Bye bye -=zoltx=-
-
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"); Response.Write(Request.Form.Get(i)+ "
"); Response.Write(Request.Form.GetKey(i)+ "
"); } Example: htmlTEXTAREAcoucou TEXTAREAcoucou
Could you help me? Bye bye -=zoltx=-
Hi, Does not Request["TEXTAREAcoucou"] work? Juno MCSD.NET, MCDBA, MCSE ---------------------------------------------------------- Support Team of EasyDotNet, INC. http://www.EasyDotNet.com DataForm.NET - The most powerful data entry web server control for ASP.NET
-
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"); Response.Write(Request.Form.Get(i)+ "
"); Response.Write(Request.Form.GetKey(i)+ "
"); } Example: htmlTEXTAREAcoucou TEXTAREAcoucou
Could you help me? Bye bye -=zoltx=-
Hi, You are missing the name attribute, e.g. <textarea id="TEXTAREAcoucou" name="TEXTAREAcoucou".... When you post a form off to the server, it is the name attribute that forms the key/value pair that you can access through Request.Form["TEXTAREAcoucou"].ToString() Hope this helps, Andy