ASPX templates
Version 3.x > ASPX templates > Confusion on how data is being pulled, please help? View modes: 
User avatar
Member
Member
basire-gmail - 2/3/2009 2:36:47 PM
   
Confusion on how data is being pulled, please help?
Maybe this is because i am new to ASP.NET but I am having a hard time seeing how data is being pulled and displayed.

I am looking at the Default Corporate ASPX Template Site, specifically the Products. Now in the .aspx or aspx.cs for products, I don't see anything that is pulling data to populate that list of products, where is this coming from?

Another this is both the listing page and product page us the same template however both page display quite a different set of data, how is this possible with only 1 template?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/4/2009 2:50:37 AM
   
RE:Confusion on how data is being pulled, please help?
Hi,

The page content and the rendered HTML is put together by using a collection of controls and methods. If there is a request for some URL, there is global.asax.cs file, where it is processed at first and also CMS has a URL rewrite engine and on the pages are added controls (not only CMS controls) that are processing and getting the data. Then also it is handled by the .Net framework. And also, the framework is doing lot of the work. Could you please try to get more information about the page life cycle in ASP.Net (e.g. using google)?

Regarding your second question - this also depends on the controls settings - for each subpage is the same but for example very important is the Path property - in this case it is not set, so the control is only looking underneath current document. If you set it e.g. to "/Products/%", on all pages will be the same (for the product list as example).


http://devnet.kentico.com/docs/tutorial_aspx/index.html

Best Regards,
Juraj Ondrus

User avatar
Member
Member
basire-gmail - 2/4/2009 1:31:40 PM
   
RE:Confusion on how data is being pulled, please help?
well i think i understand how the Products pages is now doing it. looking at this

<uc1:cmsdatalist runat="server" ID="ProductDataList" ClassNames="fcst.destinations" TransformationName="custom.hotels.preview" RepeatColumns="4" RepeatDirection="horizontal" RepeatLayout="Flow" />

the ClassNames are the document types it is looking for and the TransformationName is the layout for the list view where the detail view seems to be the default transformation layout for the document type.

While this is all good what if some of my information for the details view is going to be pulled from a Web service or from another table(document type), how would i do that?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/6/2009 7:46:36 AM
   
RE:Confusion on how data is being pulled, please help?
Hi,

There is also property for selected item transformation - "SelectedItemTransformationName". This one is used after some item is selected - e.g. for detail view. If you will use web service - you need to ensure that the service will be called when you want to - so you need to develop custom logic for this.

Best Regards,
Juraj Ondrus