CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting
3 Months Free and Free Setup - ASP.NET Web Hosting



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 6/6/2003 12:10:14 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 59 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
showjumper
Asp.Net User
How to create an itemtemplate region in server control?6/6/2003 12:10:14 PM

0/0

Can someone explain in as detailed way possible how to create an itemtemplate region in composite control that has a datalist in it? I working on a image gallery control and i can get the images from the file system and make the thumbs. Once i databind to the datalist, i need an item template region to show the thumbs. I'm using VBNET. I'd appreciate any help you can provide.
ojm37
Asp.Net User
Re: How to create an itemtemplate region in server control?2/6/2004 11:32:01 PM

0/0

Hmmm. These links tell me how to DEVELOP a templated control. I don't want to do that. I want to use an already created and debugged templated control (DataList) inside my custom control.

The big snag I'm running into is that there seems to be no way to get the template into the control without using an aspx file to do it.

ANYONE know how to embed the DataList control into a custom control and associate a template that is NOT in the aspx file with it?

TIA,
Owen
joteke
Asp.Net User
Re: How to create an itemtemplate region in server control?2/7/2004 7:11:43 AM

0/0

You create an composite control which contains a DataList as child control. See details of creating such in one of Justin Lovell's articles:

http://aspalliance.com/359

Then just expose the template properties (ITemplate type) of DataList out from your control.

Here's an article about templates:
http://aspalliance.com/366

If you don't associate an ITemplate from aspx (declaratively), you can do such by loading template from user control file (ascx) by using Page.LoadTemplate or just instantianting an class implementing ITemplate interface and associate that with the property. Note that for the composite control (containing the DataList) the implementation follows pretty much same pattern as with any completely custom templated control (things happen in same place, in CreateChildControls and so on), just instead of instantiating template yourself, you pass it to the DataList.

Thanks,

Teemu Keiski
Finland, EU
Andy Smith
Asp.Net User
Re: How to create an itemtemplate region in server control?2/7/2004 9:35:29 AM

0/0

I got annoyed as well with this, and made the RuntimeTemplate class.
It implements ITemplate for you, and you attach to it's event with a method that adds the controls you want to be in the template property of the child control.
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering Dreamweaver MX Databases Authors: Susan Sales Harkins, Bryan Chamberlain, Darren McGee, Pages: 707, Published: 2003
Beginning ASP.NET 2.0 Databases: Beta Preview Authors: John Kauffman, Thiru Thangarathinam, Pages: 427, Published: 2005
Dreamweaver MX 2004: The Complete Reference Authors: Ray West, Tom Muck, Pages: 958, Published: -1
Developing Killer Web Apps with Dreamweaver MX and C# Authors: Chuck White, Pages: 409, Published: 2004
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Programming Visual Basic 2005 Authors: Jesse Liberty, Pages: 548, Published: 2005
ASP.NET 3.5 For Dummies Authors: Ken Cox, Pages: 404, Published: 2008
Pro ASP.NET 2.0 in C# 2005: Create Next-generation Web Applications with the Latest Version of Microsoft's Revolutionary Technology Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1426, Published: 2006
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008

Web:
How to create an itemtemplate region in server control? - ASP.NET ... How to create an itemtemplate region in server control? Last post 02-07-2004 4: 35 AM by Andy Smith. 4 replies. Sort Posts: ...
Simplified ASP.NET AJAX Custom Control Development With VS Item ... NET AJAX Server Control. The files are now in my solution. The benefit of this is that the default java script file that is added when you create a new ...
How to use Repeater Control Adding Repeater server control to ASP.NET page ... The Repeater control must contain at least an ItemTemplate that in turn contains data-bound controls in ...
Cutting Edge: Understanding Templates in ASP.NET NET, a template is property of a server control that describes the static HTML, ... together with bound data—to create an HTML representation of the region. ...
WorldofASP.NET: Display Data with Repeater Control in ASP.NET ... NET Repeater Server Control is a basic container control that allows you to create custom lists from any data available to the page. The Repeater Web server ...
,possibly the perfect server control « CodeRaptor Add an ItemTemplate. Just like the .net 2.0 databound controls, the ListView ... Hello, I agree that ListView is the best data-driven server control so far, ...
CodeProject: DataCalendar. Free source code and programming help The DataCalendar control will support an ItemTemplate that works in the .aspx page like ..... the <\item template > region disappears from my designer code. ...
What is Repeater control? Once the data is bound, the format of each data item is defined by a template like ItemTemplate. Adding Repeater server control to ASP. ...
DetailsView Template To create a form which mimics Windows Forms interface put DetailsView control on form and make the ... ID="DetailsViewID" – Regular server control attribute ...
Using the DataGrid Server Control - Part 1 Privacy | Contact Us
All Times Are GMT