P
Peter Lykkegaard
Hi All
I have been working on some custom webcontrols. Among other things I
have extended the datagrid with a few things
Everything is working perfectly nice and smooth
But how on earth do I add xsd schemas for intellisense etc?
My webcontrols is in the namespace: Project.Web.UI.WebControls
I have compiled an xsd file using the generator from BlueVisionSoftWare
This file is saved in the same xml folder as asp.xsd
I have a targetnamespace in my xsd:
urn:http://schemas.myself.com/project"
I have a tag for my own controls called eg "projweb"
In my asx file I have included a reference for the xsd file in the body
tag
<body xmlns
rojweb="urn:http://schemas.myself.com/project">
Problems
a)
I need to add xtra attr in the body tag like id="myBody" and
runat="server"
I get a parser error:
"The server tag is not well formed"
Highlighting the line with the body tag
If I remove the runat="server" attr everything is fine but my code
breaks as I am adding/removing clientside JavaScript during postbacks
Eg
Me.myBody.Attributes.Remove("onLoad")
This line is highlighted with an error:
"System.NullReferenceException: Object reference not set to an instance
of an object"
That should be pretty obvious
Maybe I need to rewrite this?
Other solutions?
b)
Normally you would have the columns tag followed by a number of
boundcolumns
Eg
<columns>
<asp:boundcolumn DataField="KeyField"
HeaderText="SomeKey"></asp:boundcolumn>
Intellisense doesn't like this for my new datagrid (it compiles and runs
just fine)
I have tried to change this to eg
<columns>
<projweb:boundcolumn DataField="KeyField"
HeaderText="SomeKey"></projweb:boundcolumn>
Intellisense says ok
But the parser complains:
"Could not load type Project.Web.UI.WebControls.boundcolumn from
assembly Project.Web"
Maybe an error int xsd file?
Any suggestions?
Other than wait for VS 2005 before I add intellisense?
tia/Peter
I have been working on some custom webcontrols. Among other things I
have extended the datagrid with a few things
Everything is working perfectly nice and smooth
But how on earth do I add xsd schemas for intellisense etc?
My webcontrols is in the namespace: Project.Web.UI.WebControls
I have compiled an xsd file using the generator from BlueVisionSoftWare
This file is saved in the same xml folder as asp.xsd
I have a targetnamespace in my xsd:
urn:http://schemas.myself.com/project"
I have a tag for my own controls called eg "projweb"
In my asx file I have included a reference for the xsd file in the body
tag
<body xmlns
Problems
a)
I need to add xtra attr in the body tag like id="myBody" and
runat="server"
I get a parser error:
"The server tag is not well formed"
Highlighting the line with the body tag
If I remove the runat="server" attr everything is fine but my code
breaks as I am adding/removing clientside JavaScript during postbacks
Eg
Me.myBody.Attributes.Remove("onLoad")
This line is highlighted with an error:
"System.NullReferenceException: Object reference not set to an instance
of an object"
That should be pretty obvious
Maybe I need to rewrite this?
Other solutions?
b)
Normally you would have the columns tag followed by a number of
boundcolumns
Eg
<columns>
<asp:boundcolumn DataField="KeyField"
HeaderText="SomeKey"></asp:boundcolumn>
Intellisense doesn't like this for my new datagrid (it compiles and runs
just fine)
I have tried to change this to eg
<columns>
<projweb:boundcolumn DataField="KeyField"
HeaderText="SomeKey"></projweb:boundcolumn>
Intellisense says ok
But the parser complains:
"Could not load type Project.Web.UI.WebControls.boundcolumn from
assembly Project.Web"
Maybe an error int xsd file?
Any suggestions?
Other than wait for VS 2005 before I add intellisense?
tia/Peter