Sunday, March 11, 2012

error: RegisterScriptControl before calling RegisterScriptDescriptors

Hi,

Can you show me a repro of your issue?


Ok. E.g.:

public class MyControl: WebControl{protected override void OnInit(...) { Rating rating =new Rating(); rating.ID = ... ... Controls.Add(rating); }}//I got no issues when placing this control on aspx or Controls.Add//but when, e.g. on some page callback handler, I'm trying to generate its output:MyControl cntrl =new MyControl();Controls.Add(cntrl);cntrl.RenderControl(httpWriter);//here crash occurs, says:eScript control'...'is not a registered script control. Script controls must be registeredusing RegisterScriptControl() before calling RegisterScriptDescriptors().Parameter name: scriptControl


Would mind show more information about the page that holds the control?

E.g., in which method does your code lie in?

No comments:

Post a Comment