Skip to main content

Questions tagged [c#]

C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

Filter by
Sorted by
Tagged with
15 votes
4 answers
3k views

Are there any sources of good study materials for SDL Tridion 2011 templating?

I have been working in SDL Tridion 2011 writing C# Template Building Blogs and Dream Weaver Templates. So far, everything I have learned has been either with help from more senior developers OR by ...
R.C's user avatar
  • 926
9 votes
2 answers
1k views

Using CoreServiceClient in C#, how do I get the latest published version of an item?

I'm new to Tridion, thanks for your help :-) I can successfully bind to a service endpoint, validate CoreServiceClient.IsExistingObject("tcm:xx-xxx-xx"), and now I would like to retrieve the version (...
Ed Prescott's user avatar
8 votes
1 answer
316 views

UserPermissions required to use Core Service?

This code works nicely when I have "Administrator" privileges... string item = "tcm:12-31-64"; if (this.client.IsExistingObject(item)) { this.client.Read(item, new ReadOptions();); } ...but when ...
Ed Prescott's user avatar
8 votes
2 answers
497 views

Getting Children Keywords from another Keyword

I am trying to retrieve the Children Keywords of another Keyword from its URI with the following code: if (kwdOrCatURI.StartsWith("tcm:")) { if (kwdOrCatURI.EndsWith("-1024")) { ...
Jaime Santos Alcón's user avatar
8 votes
2 answers
325 views

Tridion 2009 C# : How To add a custom Schema name space

I'm creating a web service in C# for Tridion 2009. This web service creates a schema in Tridion based on an XML input file. The schema gets created just fine. But I can't seem to change the schema ...
Roel van Roozendaal's user avatar
7 votes
1 answer
727 views

How to get the Publication Target of a current Page in C#?

What I need is to have the Publication Target of a current Page. With the following code I get the Publication Target where the Page is published, but now I need to ensure that this Publication ...
ITB's user avatar
  • 459
7 votes
1 answer
107 views

How to Properly Dispose TopologyManagerClient?

We are using the Tridion.TopologyManager.Client assembly in our custom C# application to interact with the Topology Manager items. When I look at the assembly (version 8.5.0.466), I don't see any ...
Sabarish Senthilnathan's user avatar
5 votes
2 answers
483 views

How to implement an ASCX User control SDL Tridion 2011?

I'm pretty new to Tridion 2011 and I need to create a simple ASCX Control to implement an ASP.NET dynamically generated DropDownList. I'm a little bit confused about how to create a Compound Template ...
TommO's user avatar
  • 93
5 votes
3 answers
374 views

Tridion Mock Objects

I like to know if there is a generic mock object or community project that will provide me the ability to unit test my TOM API C# code following a test driven development approach. I'm looking for ...
user1096's user avatar
5 votes
1 answer
2k views

Coding around OData query result size limits?

I have code like this this.GetContentDeliveryService().Templates.Where(template => template.ItemId == presentationItem.Template.ItemNumber).FirstOrDefault(); which fails to find the desired ...
Ed Prescott's user avatar
5 votes
1 answer
278 views

How to get a Page's ComponentPresentations via OData?

This code: ContentDeliveryService cds = new ContentDeliveryService(...); Page itemPage = cds.Pages.Where(page => page.ItemId == itemId).Single(); Returns a page with zero ...
Ed Prescott's user avatar
5 votes
2 answers
111 views

Check permission granted to a trustee in Tridion Audience Manager AddressBook

We are creating a custom application trying to get the contact list from address book. The list of addressbooks is accessed using StaticAddressBook.GetList, it provides the list of all the ...
bRajesh's user avatar
  • 51
4 votes
2 answers
238 views

How to assign the value of a component link field to an XML element?

if (currentComponent.Schema.Title == "dtd_link_item") { var linkComponentFields = currentComponent.Fields(); var element = new XElement("SiteMapNode"); element....
user1576's user avatar
4 votes
2 answers
232 views

Read TCM IDs of multi-value embedded field using .NET Core Service script

I am trying to read the TCM ID from a multi value embedded field using Core Service. I would prefer to avoid using XML and string manipulation as much as possible and thought this was doable using the ...
G. Robb's user avatar
  • 315
4 votes
1 answer
55 views

What is the recommended best practice for C# Workflow using External Activity for Logging and Configuration?

I have a c# workflow using an external activity assembly uploaded into a TBB. Currently I have a logging class to write to a hard coded file path in the DEBUG build. The RWS example documentation does ...
Chris Mills's user avatar
  • 2,221
4 votes
2 answers
178 views

CoreService filter with SchemaPurpose and Recursive not working

I'm using Core Service API to find all component schemas within a folder recursively. This is the code. OrganizationalItemItemsFilterData filter = new OrganizationalItemItemsFilterData(); filter....
Diego Rodríguez's user avatar
4 votes
1 answer
48 views

Tridion.Logging missing one of its dependencies

I am having issues finding the proper dll reference for Tridion.Logging. Currently I am referncing/using: using System; using System.Text; using System.Text.RegularExpressions; using System....
Robert Stull's user avatar
4 votes
1 answer
97 views

Restrict publishing of Linked component within Parent Component using C# Template

Restrict publishing of Linked component withinn Parent Component using C# Template We have a dynamic component template and I want to restrict the Publishing of Linked-Component which is within Parent ...
Sunil Bahmanapad's user avatar
4 votes
1 answer
155 views

Schema with a component link with the same schema mapping problem

I am a young tridion developer with not much experience. I am using Tridion 2013sp1 and creating a new MVC web application in C#. I would like to create a menu in which each element could be a '...
Domingo Rodriguez's user avatar
4 votes
0 answers
49 views

Postback is not working when it is into a dynamic Component Presentation

we are migrating from Tridion 2011 to SDL web 8.5 and we found that a simple LinkButton is not causing the postback (we are using C#). A note here is, we have other pages with postback working, but ...
Carolina's user avatar
  • 467
3 votes
3 answers
1k views

How do I, in a C# TBB, convert a TCM ID to a link?

I have a C# TBB which takes a component, and should be pushing a link into the package stack. If the component is a publication, and it references a multimedia component, the link should be a link to ...
George's user avatar
  • 335
3 votes
3 answers
412 views

What's the benefit to use VS2012 instead of VS2010 when using Tridion 2013

I know VS2012 is able to use .NET framework 4.5. VS2010 can handle till .NET 4.0. I've seen the changelog between the frameworks, but is there any advantage according the use of Tridion 2013 when ...
Harmen's user avatar
  • 598
3 votes
2 answers
122 views

Tridion 2009 C# Powertool that uses the Tridion wysywig editor

I'm working on a power tool that editors can use to update a component. Why we want this is not important right now ;p... I'm using CKEditor for the rich text options. http://docs.cksource.com/...
Roel van Roozendaal's user avatar
3 votes
2 answers
682 views

Tridion 2009 Set Metadata field value in C#

I have hundreds of pages that are using the same page metadata and I would like to set an specific value in one of this fields that is a text with C# or other automatic way. Does anyone knows how to ...
ITB's user avatar
  • 459
3 votes
1 answer
215 views

How to retrieve GUID from files for Tridion docs SP2 via WCF?

I've been able to get my personal user information via C# -- WCF via https://docs.sdl.com/801922/351949/sdl-tridion-docs-13-sp2/using--svc-web-service-in-c--for-------------ishsts. However, there is ...
abgup's user avatar
  • 31
3 votes
3 answers
935 views

"OutputStream is not available when a custom TextWriter is used" error when returning FileStreamResult through a view with @Html.DxaEntities()

I have a controller action which should return a FileStreamResult. This action is triggered by a button click on a "Downloads" page. public class SoftwareUpdatesDownloadController : BaseController ...
Bartosz's user avatar
  • 153
3 votes
1 answer
277 views

c# Tridion 2011 How to get metadata selected keyword from a component

In Tridion 2011 I have a componen in which in the metadata fields has a keyword with different values. How should I get the selected value in c#. I tried the next but I get the name of the key not the ...
Ignacio Tome's user avatar
3 votes
1 answer
432 views

how to check published path of binaries?

I am writing a C# TBB for CT. i need to check all images in a folder and publish them. Do we have any method to check published path of a particular binary. I don't want to republish the binaries ...
AmateurCoder's user avatar
3 votes
1 answer
473 views

Component Schema convert into C# class file for Tridion Core services

I am trying to convert Component schema definition files int to C# class files using XSD.EXE for using Tridion core services. But when I create the XSD file in VS2011.Net using component schema i am ...
TridionDev's user avatar
3 votes
1 answer
210 views

Connect to ECL via .NET giving permission issue

Trying to connect to Tridion via ECL WCF api but getting permission issue. Here is my code: EndpointAddress eclServiceEndpoint = new EndpointAddress("net.tcp://localhoast:2660/...
Sankar's user avatar
  • 51
2 votes
3 answers
90 views

"Sealed" Keyword Equivalent/Similar functionality in Tridion | Stop Inheritance from Parent Publication to Child Publication

Working as a regular C# developer, I was experimenting around the "Sealed" functionality of C#. So, while using Sealed, Child class CANNOT override Parent class Method. So, in Tridion, Is it ...
D Simm's user avatar
  • 95
2 votes
3 answers
279 views

CoreService: Upload image to Tridion fails sometimes. Unable to open uploaded file

I am trying to upload an image to Tridion using CoreService. Upload is done using streamClient.UploadBinaryContent. After upload I want to create an MultiMedia component from it. The code works fine ...
Moe's user avatar
  • 21
2 votes
1 answer
210 views

How to get the list of all component templates from the publications

I want to get the list of all the component templates in .net assembly and push those component templates to the DWT. Got the publication webDav url but how to get the list of all component templates ...
Doors's user avatar
  • 45
2 votes
2 answers
89 views

Which is better performance wise : Razor TBB or C# TBB?

I have around 50 lines of code in multiple page templates. I am not able move it to a component template as I need component and template ID from page and render some text from the components in ...
Rakesh Choudhary's user avatar
2 votes
3 answers
91 views

DXA 1.7 .NET How to get Target Groups in PageModel

I am trying to use Target Groups in my site. I've just created one, published it and added it in one of the components of the page: The problem is that in the DXA I cannot see anywhere the ...
Mer's user avatar
  • 123
2 votes
1 answer
40 views

not able to read text field value provided as default value in a parameter Schema in C# TBB

I created one Parameter Schema and added one text field testText, and assigned 9 as the default value for that field in schema. I have assigned this parameter schema to my TBB in CMS. Now i am trying ...
SDLBeginner's user avatar
2 votes
2 answers
190 views

User creation using core service on Tridion 2013

I am trying to automate few daily tasks for some of Tridion admins. We have 800+ publications 600+ users and more than 1000 groups. So, I am trying to automate user creation. Recently we have migrated ...
Sankar Sengupta's user avatar
2 votes
1 answer
113 views

Registering Jscript on a Tridion-generated page

I'm attempting to register some javascript on a Tridion-Generated page via a user control. I've created a page object that uses a generic aspx page template. The TBB for the page template contains ...
Freq's user avatar
  • 317
2 votes
1 answer
104 views

Does DXA support Extended Keyword Models?

I am using dxa 2.2 (.net) and I created a custom Keyword Model BaseKeywordModel that extends KeywordModel. When DXA tries to map a published component that has a keyword field to a model that uses the ...
Jaime Santos Alcón's user avatar
2 votes
0 answers
93 views

Using Ajax to submit a form and returning a confirmation page

I am trying to submit a form through an ajax process : @using (Ajax.BeginForm("SendEmail", "Form", new AjaxOptions { UpdateTargetId = "replace", InsertionMode = ...
Payam 's user avatar
  • 21
1 vote
2 answers
1k views

Tridion Core Service - create component issue

I try to CRUD components in an ASP.NET MVC 4 project using Tridion Core Service First, I read a configuration component : var publicationData = client.Read("tcm:180-278202", new ReadOptions()) as ...
Giu Do's user avatar
  • 847
1 vote
2 answers
201 views

Structure groups hierarchy to be used for parent child relationship

I have a scenario where I have components with parent-child relationship. For instance, a news can have multiple child news component. The pages for each news will be created under its parent news. ...
Saurabh Mehndiratta's user avatar
1 vote
3 answers
253 views

Want to migrate content and page from Tridion to IBM WCM

Want to migrate content and Pages from the Tridion to the WCM. Here need is the content and page source from the CMS. Want to read the Source and store it on the local machine How to proceed with ...
k951's user avatar
  • 11
1 vote
4 answers
79 views

Event Handler get the user who throws the event

I need to avoid certain group to publish a structure group but I don't know how to get that user to check if belongs to a certaing group. This is the code I have: public ...
Ignacio Tome's user avatar
1 vote
3 answers
129 views

c# powertool tridion2009 Component.Content not working

I'm trying to read the component source tab xml. when i try to get the component.content or Component.Xml Component.LoadXml(Component.xml) it returns an error. using Tridion.ContentManager.Interop....
Roel van Roozendaal's user avatar
1 vote
2 answers
278 views

Tridion uploading .net assembly error type mismatch

I am trying to upload a .net TBB assembly thorough the Visual Studio add-in. However, I am getting the following error: Error: Error: Type mismatch at[remote] Tridion.ContentManager....
Ali's user avatar
  • 1,447
1 vote
2 answers
129 views

DXA Issue mapping ComponentLink fields to Model c#

I have created a component and added it in a page and mapped all in my DXA. The problem I'm having is that when I call ContentProvider.GetPageModel(pageUrl, WebRequestContext.Localization, true) to ...
Mer's user avatar
  • 123
1 vote
1 answer
511 views

How to read the component the parameter schema field

Created Schema A which has field called keys which is embeeded schema type. The embeeded schema consists of two fields called name and value. Created Component A using schema A. created parameter ...
Doors's user avatar
  • 11
1 vote
1 answer
799 views

How to access the parameter schema fields from C# TBB

I have schema A that has the field called Keys which is embedded schema type. The embedded schema consists of 2 fields that is the keyname and keyvalue. I have created component using schema A. After ...
k951's user avatar
  • 41
1 vote
1 answer
154 views

C# how to add values in ItemFields inside EmbeddedSchemaField of a STUB component

I have an embedded schema for a STUB component metadata field which has 4 fields and marked as "Allow Multiple Values", along-with other fields in SDL Tridion. I am using SDL Tridion Web 9.0....
Sankar's user avatar
  • 51