Access data data folders data from C #

I defined the page data folder in the Data view and created data for one of my pages.

How can I access this data from an ASP.NET user control hosted on a page?

+4
source share
1 answer

Here is a small code example for retrieving page folder data for a given folder type. Change the type of Martin.MyPageFolder to your type and it should work fine.

using (DataConnection connection = new DataConnection()) { var pageFolderData = from d in connection.Get<Martin.MyPageFolder>() where d.PageId == SitemapNavigator.CurrentPageId select d; foreach (var item in pageFolderData) { // Use the item here as you need } } 
+5
source

Source: https://habr.com/ru/post/1385393/


All Articles