Could someone tell me why is it when I put AllowSorting="True" inside my datagrid and try to render it later in my code I get this :<BR><BR>------------------------------------------------------------<BR>Control &#039;dgDIdata__ctl2__ctl0&#039; of type &#039;DataGridLinkButton&#039; must be placed inside a form tag with runat=server.<BR><BR>Source Error: <BR><BR>Line 206: Dim SW as New StringWriter(SB)<BR>Line 207: Dim htmlTW as New HtmlTextWriter(SW)<BR>Line 208: dgDIdata.RenderControl(htmlTW) <BR>Line 209: <BR>Line 210: Response.Write(SB.ToString())<BR>-------------------------------------------------------------<BR><BR>When I take AllowSorting="True" completely out and run dgDIdata.RenderControl(htmlTW) to output results to Excel everything works fine. I even tried assigning dgDIdata.AllowSorting = "False" before doing rendering but that didn&#039;t help. <BR>I really don&#039;t want to turn this into XML/XSLT sorting excersise. Any help would be greatly appriciated.