|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Unable to find control id referenced by the 'ControlToValidate' Prusercontrol, and I get this error on the validator control. I have tried changing to ClientID and UniqueID with no success. What am I missing? I am adding the control to the same TableCell so the container should be the same. Unable to find control id 'TaskNotesID$' referenced by the 'ControlToValidate' property of 'TaskNotesID$Required' case "TextBox": TextBox cTextBox = (TextBox)ctrl; cTextBox.Text = "Test"; mcell.Controls.Add(cTextBox); RequiredFieldValidator mReq = new RequiredFieldValidator(); mReq.ControlToValidate = cTextBox.ID; mReq.ErrorMessage = "Error"; mReq.Text = "*"; mcell.Controls.Add(mReq); Thanks! Vibs Nevermind. I figured it out. Thanks!!
Show quoteHide quote "vibs" wrote: > I am adding a textbox and a requiredvalidator control dynamically to a > usercontrol, and I get this error on the validator control. I have tried > changing to ClientID and UniqueID with no success. What am I missing? I am > adding the control to the same TableCell so the container should be the same. > > Unable to find control id 'TaskNotesID$' referenced by the > 'ControlToValidate' property of 'TaskNotesID$Required' > > case "TextBox": > TextBox cTextBox = (TextBox)ctrl; > cTextBox.Text = "Test"; > mcell.Controls.Add(cTextBox); > > RequiredFieldValidator mReq = new RequiredFieldValidator(); > mReq.ControlToValidate = cTextBox.ID; > mReq.ErrorMessage = "Error"; > mReq.Text = "*"; > mcell.Controls.Add(mReq); > > Thanks! > Vibs
Persisting ListItemCollection values across postback, using ViewSt
edit single record in formview Extracting values from child controls of a Repeater Format telephone number?? javascript within TEMPLATECOLUMNS Force multi line field value to output with line breaks? GridView using an ObjectDataSource - total rows with a custom List Wiring up events... Login Control inheritance issues ASP.NET web hosting |
|||||||||||||||||||||||