kentico

Cannot apply indexing with [] to an expression of type 'ISet<string>'

我的未来我决定 提交于 2019-12-11 06:53:33
问题 I am getting Error 'Cannot apply indexing with [] to an expression of type 'ISet'' for this code snippet foreach (GridViewRow grv in customTableDataList.UniGrid.GridView.Rows) { if (grv != null) { if (null != grv.FindControl(ItemCheckBoxID) && ((CheckBox)grv.FindControl(ItemCheckBoxID)).Checked) { //At this line I am getting error. itemIds += customTableDataList.UniGrid.ActionsID[rowCounter] + ", "; } rowCounter++; } } Can anyone give some more details to resolve this. 回答1: Add new using:

Kentico ASCX transformation page type properties

爷,独闯天下 提交于 2019-12-11 05:28:41
问题 I'm starting to plan out an full dynamic accordion. The idea is files would be upload to a series of folders. Now i could place a bunch of repeaters on a page, one per folder and have a transformation that reads the files and generates links and the HTML for the accordion. What I'm hoping to do is have one transformation what will read all the folders, and their children. So initial logic is something like this. if (PageType = cms.Folder && HasChildren = true){ Output folder name + html

Kentico Repeater HTML Properties showing with selected transformation

落爺英雄遲暮 提交于 2019-12-11 01:33:38
问题 My HTML envelope wraps my repeater transformation in a TABLE tag. Without using JS, how do i ensure this HTML isn't visible for the selected transformation. I have no objections to have a template for the selected transformation data, just unsure how to do that. Here is my Transformation: <tr> <td><%# FormatDate(Eval("Date")) %></td> <td><a href="<%# GetDocumentUrl() %>"><%# Eval("Subject") %></a></td> <td><%# Eval("From") %></td> </tr> And this is my selected transformation: <section id=

Kentico 8 - page access: deny for all users except a role

坚强是说给别人听的谎言 提交于 2019-12-10 21:59:45
问题 What I'm trying to do now is to let only users of a specific role to access a page (and its child pages). this is what I got at the moment: USERS User A -> Member of RoleA, RoleB User B -> Member of RoleB. CONTENT TREE MainNode PAGE TO SECURE other pages that need to be public. PERMISSIONS ON "PAGE TO SECURE" added "Role A" and check "Allow" on "full control". "Required Authentication" set to "Yes". DESIRED RESULT "PAGE TO SECURE" accessible only if a user is part of Role A REGARDLESS the

Kentico 7 hide editable text if it's empty

不羁岁月 提交于 2019-12-10 17:49:24
问题 I have an editable text web part on a page template. It has a custom HTML envelope before and after the text. How can I hide the whole thing, envelope included, if the editable text is empty? I need to hide it because the envelope adds stylized markup that shouldn't be visible when there is no text. Can it be done with a K# snippet on the Visible property? I'm unclear how interrogating a document's property works. Thanks! 回答1: Try this as the "Visible" property: {% (ViewMode != "LiveSite") ||

SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist

妖精的绣舞 提交于 2019-12-10 17:15:45
问题 EDIT: One important detail that I original left out (because I didn't know it was important) is that we were running these sites in full IIS, not from IIS Express. We're trying to setup local dev environments for Kentico CMS that will add our local machines to our current synchronization chain of Dev --> Staging --> Prod (so we'll wind up with Locals --> Dev --> Staging --> Prod). We copied our Dev DB to our local machines onto the (localdb)\v11.0 instance of SQL Server, but we're running

kentico add new form field via API

流过昼夜 提交于 2019-12-08 17:40:28
Hello Kentico experts, I need to create some new form fields dynamically via Kentico API. I found a solution but it is for Kentico 6 and it is not available for my version (i'm using Kentico 8). https://devnet.kentico.com/articles/how-to-add-a-new-field-to-a-document-type-using-api Please help ! Thanks, Duong This should work: string classname = "classname"; DataClassInfo dci = DataClassInfoProvider.GetDataClassInfo(classname); if (dci != null) { FormInfo fi = new FormInfo(dci.ClassFormDefinition); if (fi != null) { // Field definition FormFieldInfo ffi = new FormFieldInfo(); ffi.Name =

Difference between portal template and ASPX template in Kentico

无人久伴 提交于 2019-12-07 09:46:25
问题 What is the difference between portal template and ASPX template in Kentico? Which is preferable? 回答1: As a "hardcore" developer and Certified Kentico Trainer I always use and always recommend the use of the Portal Engine over the ASPX Templates. I say that because the Portal Engine gives a rich UI for creating and configuring templates . From directly within the CMS Desk you can create templates and add web parts to them. You also get a nice property editor dialog with custom selectors for

How to prevent ASP.NET and Kentico from processing static files

穿精又带淫゛_ 提交于 2019-12-07 07:28:50
问题 I have a Kentico CMS website that is processing static resources, such as png files. I would like these files to not be processed by ASP.NET. How do I do this? I am running IIS 7.5 and ASP.NET 3.5 with Kentico CMS (Web Forms). App Pool is integrated mode I looked at the <location> element in the web config file but it seemed implementing it didn't make a difference. Update: the images are contained within a folder named /res, a child of the webroot folder. i.e. not managed by kentico, the

Copy a LIVE Kentico instance and its database to my local machine

試著忘記壹切 提交于 2019-12-06 15:41:53
The error appears to be this: ERROR: An error occurred: Folder with default data must exist. Here are my steps to recreate. I have read How to Copy Kentico Instance to a Local Machine? and followed all of its steps. It did not resolve my issue. Kentico keeps wanting me to do "Step 1 - Database Instance," and when I go through those steps, I receive the above error. Here are the steps I took: Database Backup the LIVE database. Restore it locally. Add the appropriate server logins and database users. This is how I add the Server Login USE [master] GO CREATE LOGIN [myUser] WITH PASSWORD=N