简体   繁体   中英

Access HTML controls from code behind C#

My webpage generates a lot of HTML dynamically using jQuery to display data. However, I need to access those dynamic HTML controls from C#. I cannot do runat="server", because JQUERY does its magic at runtime, depending on what user selects.

Is there any way to access the HTML of these dynamically created controls from code behind?

Thanks!

如果您只需要输入字段(输入,选择,单选,复选框)中的值,只需确保JQuery在主<form>标记内创建了这些值,然后您就可以在提交表单后使用以下方法在服务器端读取它们: Request.Form["myFieldName"]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM