|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Deriving from built-in DataGrid controlSystem.Web.UI.WebControls.DataGrid. When I try to use this class in my .aspx page, I get loads of parser warnings in the Task pane telling me that e.g. <HeaderStyle> is not supported by the active schema. This is true for any DataGrid "sub control" I'm using. Is there an easy way to get rid of these warnings? TIA, Axel Dahmen ------------ This is my class: public class SortingDataGrid : System.Web.UI.WebControls.DataGrid { ... } ------------ This is what I've added to the .aspx page (HeaderStyle and PagerStyle are underlined in red): <%@ Register TagPrefix="exc" Namespace="Common.Controls" Assembly="Common" %> .... <exc:SortingDataGrid Runat="server" ID="grdTemp" ...> <HeaderStyle .../> <PagerStyle .../> ... <exc:SortingDataGrid/> Hi Axel,
Welcome to the ASPNET newsgroup. Regarding on the custom webcontrol, I think the warning you encountered in IDE is the design-time xml schema warning. As for VS IDE it will validate the control's markup in the aspx file. And for built-in controls, there has built-in schemas associated with them( for vs 2003, it is stored in the following localtion: C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml ) And for our custom controls, since there is no schema associated with them, IDE will failed to validate the markup and report some warning. You can just ignore it since that doesn't affect runtime behavior. However, if you do want to add design-time support on the schema for custom control, you can have a look at the following msdn article which discussing on design-time support for custom web server controls: #Adding Design-Time Support to ASP.NET Controls http://msdn.microsoft.com/library/en-us/dnaspp/html/ASPNet-AddDesignTimeSupp ort.asp?frame=true Hope this helps. Regards, Steven Cheng Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Surprise with Textbox1.Text
Get cached value returned from Select() controls recommendation Determining which control has the focus on my web page User Control question Calendar control question CREATE DATABASE permission denied in database 'master' A strange JScript behavior No "update" on DataSet, Server-Error Gridview invisible--why? |
|||||||||||||||||||||||