Hi all,
I have a datagrid that you can sort on a column by clicking on the header text of that column. This is pretty standard and works fine.
Recently I decided to change the layout of my site and to use Master Pages rather than just including header and footer user controls on every single page. I have a master page that has my layout template, then in each page I have:
<mp:contentcontainer runat="server" MasterPageFile="mymastertemplate.ascx" ID="Contentcontainer1">
<mp:content id="bodyRegion" runat="server">
my individual page content goes here.
</mp:content>
</mp:contentcontainer>
This works fine on all of my pages except the ones that have sortable datagrids. It raises a javascript error when I generate the datagrid now, as it cannot find the column objects to sort on. Before the sort links looked like:
javascript
:__doPostBack('dgClasses$_ctl1$_ctl0','' )
Now they look like:
javascript
:__doPostBack('Contentcontainer1$_ctl0$b odyRegion$dgClasses$_ctl1$_ctl0','')
And it cannot find this object, so sorting doesn't work now. The javascript error is:
Error: Expected ';'
Has anyone else run into this problem before of having sortable datagrids not work when using Master Pages?
Thanks!
Justin Toth
http://www.universityauction.net