Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 13th, 2005, 01:46 PM
Authorized User
Join Date: Mar 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sortable DataGrid within Master Pages template

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.

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?


Justin Toth
Justin Toth

Similar Threads
Thread Thread Starter Forum Replies Last Post
Master Pages Jayahar ASP.NET 3.5 Basics 1 September 2nd, 2008 04:20 PM
Master Pages, Content Pages and CSS carliviris Visual Studio 2005 0 January 8th, 2008 05:56 PM
Master pages wunnavabk ASP.NET 2.0 Professional 1 June 25th, 2007 07:09 AM
Chap 2 - Template.master.cs rparchment BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 October 25th, 2006 10:55 PM
User object in Master Page template? lancer ASP.NET 2.0 Basics 0 June 22nd, 2006 01:32 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.