i'm trying to load a user control from codebehind service and get it's html value. However there's a repeater in that control that isn't getting loaded/initialized so it's always null
i get
Object reference not set to an instance of an object.
within the loadOrderInvoiceView function when it tries to
// fill repeater
this.rptView.DataSource = result;
this.rptView.DataBind();
at the line where it says this.rptView.DataSource = result;... i've tried to debug and for some reason this.rptView is null
And here's the service call
StringBuilder sb = new StringBuilder();
StringWriter tw = new StringWriter(sb);
HtmlTextWriter hw = new HtmlTextWriter(tw);
//ctrl.RenderControl(hw);
myControls.OrderInvoiceView oiv = new myControls.OrderInvoiceView();
oiv.loadOrderInvoiceView(OID);// load the control with order id
oiv.RenderControl(hw);
return sb.ToString();
thanks in advance for any ideas. I'm using .net 4
this.rptView?