Rendercontrol brugt i en usercontrol
Jeg skal downloade indholdet af et DataGrid (.NET 1.0) til et Excelark og til det bruger jeg bl.a. Rendercontrol, men får fejlen:Control '_ctl0_dgTaskList__ctl3__ctl0' of type 'DataGridLinkButton' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Control '_ctl0_dgTaskList__ctl3__ctl0' of type 'DataGridLinkButton' must be placed inside a form tag with runat=server.
Source Error:
Line 769:
Line 770: 'Get the HTML for the control
Line 771: dgTaskList.RenderControl(myHtmlTextWriter)
Line 772:
Line 773: 'Write the HTML to the browser
men <Form> er jo netop ikke tilladt i en .ascx fil - kan man komme udenom dette?