How to get html controls form html table in server side,asp.net

前端 未结 2 1593
花落未央
花落未央 2021-01-29 09:45

Can any body tell me how can i get html controls form html table in server side in asp.net? My code goes like this.

 
相关标签:
2条回答
  • 2021-01-29 10:06

    ypur question is bit unclear, but I think this will help for eg. to access the contorl with in a gridview we can use this, say if you place a hidden field inside gridview with the id of "hfone"

    inside GvRowDataBound event var field= (HiddenField)e.Row.FindControl("hfone");

    so you can access the values by field.value

    0 讨论(0)
  • 2021-01-29 10:08

    write the runat="Server" attribute in html control then you can use html control on server side.

    0 讨论(0)
提交回复
热议问题