How to access HTML content in code behind

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muthukumaran08
    New Member
    • Sep 2010
    • 4

    How to access HTML content in code behind

    I have textarea and link on my code aspx page. How can i access these values on my code aspx.cs page?
    Note: I do not want to use runat=server tag for my table.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Well, you have to have runat="server" in your TextArea and your Link if you want to access them in your server code like any other ASP.NET control. You could use the Request object to retrieve the TextArea by ID from the Request.Params property.

    It's best if you posted your code so that we can help you further.

    -Frinny
    Last edited by Frinavale; Sep 22 '10, 01:23 PM.

    Comment

    • ZiadElmalki
      New Member
      • Sep 2010
      • 43

      #3
      If you do not want to use runat=server you can only really read what the client posts back to use and cannot manipulate the element from your server code (besides some render tags in the markup or something) Make sure the element is nested inside the form element, give it an id, and you should be able access the client posts to you via HttpRequest.For m collection via the id you specified.

      Comment

      • muthukumaran08
        New Member
        • Sep 2010
        • 4

        #4
        yes thanks. I used request.form to get textarea

        Comment

        Working...