Accessing html objects in code in asp.net c #

6

I have a page that contains asp.net and html objects.

How do I access design html objects in .cs with C# ?

    
asked by anonymous 25.05.2015 / 21:52

1 answer

5

To access an HTML object through C # code, you must add the id and runat="server" attributes in the HTML element you want to access.

Once this is done, the HTML element is available to be accessed via C # using the ID.

    
25.05.2015 / 22:17