天天看點

.Net:擷取使用者控件中的子控件的值

擷取頁面控件的子控件值:

 string areaStr = Request.Form[area.UniqueID];

擷取使用者控件中的子控件的值:

            string areaStr = area.SelectedValue;

            DropDownList  dr  = (DropDownList)this.FindControl("area");

            areaStr = Request.Form[dr.UniqueID]; 

繼續閱讀