Sunday, 15 April 2012

c# - Unable to access a control inside a user control inside a Dynamic Placeholder -



c# - Unable to access a control inside a user control inside a Dynamic Placeholder -

user selects value dropdownlist populates placeholder specific usercontrol depending on selected value. want retreive values controls in user command user clicks submit button. here snippet of code.

protected void submit_click(object sender, eventargs e) { string verified = verifycontactinfo1.findcontrol("verifiedcorrect").tostring(); //1 if checked nil not checked string applicationid = selectapplication.selectedvalue; command form = justificationdynamiccontrolsholder.findcontrol(justificationname); //texbox controls string justification = form.findcontrol("justification").tostring(); string credentials = form.findcontrol("credentials").tostring(); //dropdownlist controls string industry = form.findcontrol("industrylist").tostring();

when code runs gives nullexception value error. variable "form" never recieves value. can provide help on error? or there improve way retrieve these values?

c# asp.net user-controls

No comments:

Post a Comment