Accessing HTML Elements in ASP.Net

后端 未结 3 947
情话喂你
情话喂你 2021-01-12 09:08

I want to change the text of a radio button (html element) not ASP.NET component.

How can I change it from ASP.NET?

Thanks

3条回答
  •  爱一瞬间的悲伤
    2021-01-12 09:36

    You would need to add a runat="server" attribute to the HTML for that element.

    
    

    This will allow you to access the element via its ID, someRadioId. This element in your code behind will be of type HtmlInputRadioButton.

    See this article on MSDN

提交回复
热议问题