473,320 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Intellisense, schema validation for ASP.net custom templated control

I went through some article to see how I can add schema validation for
my templated control by adding an XSD file into the VS.NET schema
folder. Everything works fine for a schema like this:

<mycontrolns:mycontrol id="test" runat="server">
<mytemplate>test</mytemplate>
</mycontrolns>

and I was able to specify the XSD to validate "mytemplate" as the only
valid child type for "mycontrol". Here's a challenge: Is there anyway
so that I can specify my XSD to make an asp:button with id being one
of a given set of valid values to be the only valid child type for
"mytemplate"? e.g.

<mycontrolns:mycontrol id="test" runat="server">
<mytemplate><asp:button id="some_valid_id"
runat="server"/></mytemplate>
</mycontrolns>
- will be validated by the XSD

and

<mycontrolns:mycontrol id="test" runat="server">
<mytemplate><asp:button id="some_invalid_id_not_listed"
runat="server"/></mytemplate>
</mycontrolns>
- will be invalidated by the XSD

I went through some article to see how I can add schema validation for
my templated control by adding an XSD file into the VS.NET schema
folder. Everything works fine for a schema like this:

<mycontrolns:mycontrol id="test" runat="server">
<mytemplate>test</mytemplate>
</mycontrolns>

and I was able to specify the XSD to validate "mytemplate" as the only
valid child type for "mycontrol". Here's a challenge: Is there anyway
so that I can specify my XSD to make an asp:button with id being one
of a given set of valid values to be the only valid child type for
"mytemplate"? e.g.

<mycontrolns:mycontrol id="test" runat="server">
<mytemplate><asp:button id="some_valid_id"
runat="server"/></mytemplate>
</mycontrolns>
- will be validated by the XSD

and

<mycontrolns:mycontrol id="test" runat="server">
<mytemplate><asp:button id="some_invalid_id_not_listed"
runat="server"/></mytemplate>
</mycontrolns>
- will be invalidated by the XSD

Thanks!
Nov 18 '05 #1
0 1110

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Don | last post by:
Hi: I have created an xsd from my xml document. I pop this xsd in the following directory: C:\program files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml. That give me...
2
by: Earl Teigrob | last post by:
I have created a simple custom control that uses a table to create space around its contents. The code in the aspx page is show below. My problem is that the controls within the template can not be...
0
by: Earl Teigrob | last post by:
I have created a templated custom control that simply creates a spacing table around other objects. This control works fine for most uses but when I add it inside the ItemTemplate of a DataGrid...
2
by: Barbara Alderton | last post by:
I setup some standard Required Field Validation controls and one Custom validation control on an ASP.NET page (within a user control) to validate text entry. I also setup a Summary Control to post...
1
by: Frédéric Mayot | last post by:
Hi, I built a very simple templated user control but unfortunately, the template "Content" is not recognized by intellisense and it says that my component "SubForm" is not supposed to contain...
0
by: info | last post by:
Hi, Is it possible to include in the Schema validation file, every custom error message for each validation rules? This mean, in the same xsd file we can have the validation rules (patterns)...
1
by: Andrew Clancy | last post by:
Hi, Myself and a colleague are attempting to mimic the custom template functionality of the ASP.Net 2 Login control. Essentially, we would like to have the ability within our...
11
by: Nick Gilbert | last post by:
Hi, How can I create a custom control which will wrap its content in a header and footer? eg: Is it possible to create a .NET user control which can surround other controls? eg:...
7
by: Andrew Robinson | last post by:
I have an overridden control: public class DJGridView : GridView { } All works great except that I loose IntelliSense for all of the child elements while editing the HTML file from within...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.