Hi One question what is the tw is in this small section of code
You have assigned a new web controls of tw but qwhere have you specified this and does in state that is on he server side so there fore where you use this tw it must have runat="server" must be placed within the form tag HTH Rich -----Original Message----- From: Veeraraghavan, Ravi TCX12 [mailto:[EMAIL PROTECTED] Sent: 04 January 2005 06:12 To: AspNetAnyQuestionIsOk ([email protected]) Subject: [AspNetAnyQuestionIsOk] Export to EXCEL from datagrid Hi, Export to Excel from datagrid gives me the error mentioned below. Control 'MyDataGrid__ctl2__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 'MyDataGrid__ctl2__ctl0' of type 'DataGridLinkButton' must be placed inside a form tag with runat=server. Source Error: Line 116: Dim hw As New System.Web.UI.HtmlTextWriter(tw) Line 117: ' Get the HTML for the control. Line 118: MyDataGrid.RenderControl(hw) Line 119: ' Write the HTML back to the browser. Line 120: Response.Write(tw.ToString()) Best Regards, Veeraraghavan Ravi-TCX12 Petroleum Development Oman LLC * PO Box 81, Postal Code 113 Muscat, Sultanate of Oman *+968-24670298(Office) +968-9514325 (Mobile) [Non-text portions of this message have been removed] Yahoo! Groups Links Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
