Accessing value of a hidden field on Masterpage from codebehind

后端 未结 4 560
失恋的感觉
失恋的感觉 2021-01-06 16:40

In a follow up to my previous question, I want to get the value of the hidden input field from the child page codebehind.

I tried HtmlInputHidden hdnID = (H

4条回答
  •  不思量自难忘°
    2021-01-06 17:17

    I don't think you need to prefix the hidden field's ID with ctl00_, just use the normal ID:

    (HtmlInputHidden)Page.Master.FindControl("hdnField");
    

提交回复
热议问题