Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Custom Web Controls and

.

Message #1 by kevin.burton@i... on Thu, 14 Dec 2000 13:12:09 -0600
Every example that I have seen so far puts a custom web control in side of a

<form runat=server>. If I have a set of custom controls like:



<form ....>

	<mycontrols:treeview site=a directory=. ... runat=server>

	<mycontrols:treeview site=b directory=. ... runat=server>

	<mycontrols:treeview site=c directory=. ... runat=server>

</form>



The purpose of each of the controls is to display a directory tree for the

machine specified with the site argument. I want to be able to dynamically

expand and collapse each node of each tree with a mouse click. The problem

that I see with having each of these in a form is that the page will be

resubmitted when I click on anyone of these trees. What are the implications

of not using <form>? How can I just modify the node that I clicked on (make

it visible or not, changing the bitmap, etc.)?



Thank you.



Kevin Burton

kevin.burton@i...





---

You are currently subscribed to aspx as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by "Dave Sussman" <davids@i...> on Fri, 15 Dec 2000 09:20:52 -0000
Kevin



This sort of functionality is really a feature of the control. If the

control only spits out HTML, then every actioon will require a postback

There are two ways around this:



1. Subclass the control and add your own rendering, outputting all of the

content as well as client side script.

2. Wait for an indefinite period until someone else produces a treecontrol

that does this 8)  I do know that Microsoft are working on one, that will

have the option of dynamic client-side functionality if the browser supports

it, but there's no timeframe for te release of this control.





Dave





<kevin.burton@i...> wrote in message news:25618@a...

>

> Every example that I have seen so far puts a custom web control in side of

a

> <form runat=server>. If I have a set of custom controls like:

>

> <form ....>

> <mycontrols:treeview site=a directory=. ... runat=server>

> <mycontrols:treeview site=b directory=. ... runat=server>

> <mycontrols:treeview site=c directory=. ... runat=server>

> </form>

>

> The purpose of each of the controls is to display a directory tree for the

> machine specified with the site argument. I want to be able to dynamically

> expand and collapse each node of each tree with a mouse click. The problem

> that I see with having each of these in a form is that the page will be

> resubmitted when I click on anyone of these trees. What are the

implications

> of not using <form>? How can I just modify the node that I clicked on

(make

> it visible or not, changing the bitmap, etc.)?

>

> Thank you.

>

> Kevin Burton

> kevin.burton@i...

>

>

> ---

> You are currently subscribed to aspx as: $subst('Recip.EmailAddr')


leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com

>

>







---

You are currently subscribed to aspx as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #3 by Anders Lundholm <alu@m...> on Fri, 15 Dec 2000 13:42:43 +0100
Hello!



> 1. Subclass the control and add your own rendering, outputting all of the

> content as well as client side script.



Isn't it too slow to add nested child-controls to the rendering?!



I'm thinking of building a treeview control (like many others I guess) which

will allow the user to add nodes to a tree. The control then generates a

hierarical XML as output which then can be formatted using XSLT stylesheets.



Thus adding DHTML to a treeview is up the user, not the component. Really

smart, I think!



With Regards

Anders Lundholm



---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to aspx as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #4 by Anders Lundholm <alu@m...> on Fri, 15 Dec 2000 13:57:55 +0100
Hello Kevin



I'm now (just begun) writing a treeview control right now, but it's at a

very early stage.

It will allow you to add nodes and such know from a normal tree-view

control. However, the nice thing about this is it will only output XML -

thus making it useable for other appz than websites.



You should, with the example XSLT stylesheet, be able to wrap your own

custom design around it, if the 'standard' windows 2000 design provided by

me isn't desired. With the XSLT stylesheet, I just provide the 'hierachy'

and you just wrap your HTML around that. DHTML or not.



If you're not into XSLT (yet), I suggest you should look around on the web

for more information until I'm releasing the beta which should be available

withing one week or so!



Ok?



> Kevin

> 

> This sort of functionality is really a feature of the control. If the

> control only spits out HTML, then every actioon will require a postback

> There are two ways around this:

> 

> 1. Subclass the control and add your own rendering, outputting all of the

> content as well as client side script.

> 2. Wait for an indefinite period until someone else produces a treecontrol

> that does this 8)  I do know that Microsoft are working on one, that will

> have the option of dynamic client-side functionality if the browser

supports

> it, but there's no timeframe for te release of this control.



With Regards

Anders Lundholm



---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to aspx as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #5 by "David J. Ihne" <davidji@p...> on Fri, 15 Dec 2000 19:23:59 -0800
I ran into this problem developing a treeview as well. I removed the <form>

tag just to test, and found the client events ran without form posting.

However, if you ever wanted to upgrade your treeview to support on-demand

loading of nodes, you would need those <form> tags (as in form posting only

if the nodes are not yet loaded). So I derived from the

System.Web.UI.HTMLControls namespace instead of web controls; you can wire

up client events to those controls without the form posting.



David



----- Original Message -----

From: <kevin.burton@i...>

To: "ASP+" <aspx@p...>

Sent: Thursday, December 14, 2000 11:12 AM

Subject: [aspx] Custom Web Controls and <form>.





> Every example that I have seen so far puts a custom web control in side of

a

> <form runat=server>. If I have a set of custom controls like:

>

> <form ....>

> <mycontrols:treeview site=a directory=. ... runat=server>

> <mycontrols:treeview site=b directory=. ... runat=server>

> <mycontrols:treeview site=c directory=. ... runat=server>

> </form>

>

> The purpose of each of the controls is to display a directory tree for the

> machine specified with the site argument. I want to be able to dynamically

> expand and collapse each node of each tree with a mouse click. The problem

> that I see with having each of these in a form is that the page will be

> resubmitted when I click on anyone of these trees. What are the

implications

> of not using <form>? How can I just modify the node that I clicked on

(make

> it visible or not, changing the bitmap, etc.)?

>

> Thank you.

>

> Kevin Burton

> kevin.burton@i...



---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to aspx as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index