Custom Webcontrols, VS EDI support and intellisense?

  • Thread starter Peter Lykkegaard
  • Start date
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:projweb="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
 
S

Steven Cheng[MSFT]

Thanks for Teemu's informative resources:

Hi Peter,

Here is a tech article discussing on adding design-time support (including
html source intellisense ) for asp.net web control:

#Adding Design-Time Support to ASP.NET Controls
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html
/ASPNet-AddDesignTimeSupport.asp

Hope also helpful!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
P

Peter Lykkegaard

For the Intellisense part you could give a shot for this tool:

ASP.NET Intellisense Generator
http://www.bluevisionsoftware.com/WebSite/ProductsAndServicesInfo.aspx?ID=9

Sorry I was not quite clear on that point
I am actually using the Intellisense Generator allthough I do experience
some glitches as the generated XSD is far from perfect
Might be ok with more simple controls than the datagrid, as a lot of
people is using this tool :)

Thanks for your reply though :)

- Peter
 
P

Peter Lykkegaard

Here is a tech article discussing on adding design-time support (including
html source intellisense ) for asp.net web control:
Yep I have read the article, from the original source though
Quite nice :)

I think I will start a small test project based on the blog sample, just
to examine if everything is put in the right place
Hopefully Whidbey will be just a little better at this :)

It is a rather small issue and just nice to have, but at the same time
quite frustrating :)

Thanks for the link

- Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top