Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
3answers
55 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 ...
1
vote
2answers
50 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 ...
2
votes
2answers
51 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 ...
2
votes
1answer
27 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 ...
4
votes
0answers
32 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 ...
1
vote
1answer
75 views

How can I get a Localization object to query a different Publication

I'm new to DXA and faced an unknown while fetching DCP (or to say EntityModel) from other Publication. I've a pre populated Localization object which points to current Publication/site context. How ...
3
votes
2answers
115 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....
5
votes
2answers
114 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 ...
0
votes
2answers
59 views

sometimes _client.IsExistingObject(id) returns false for . and /

_client.IsExistingObject(webdav URL of folder) returns false when i try to search folder with name "." and "/" which already exists in the folder where i am searching
2
votes
3answers
86 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 ...
3
votes
1answer
37 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....
2
votes
0answers
69 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 = ...
4
votes
1answer
187 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 ...
4
votes
1answer
136 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 '...
2
votes
2answers
152 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 ...
-1
votes
2answers
362 views

How to debug SDL tridion code?

I am new to Tridion back end coding. I have used the logger for the debug. But I didn't get much information from there. Can anyone please let me know the most common way to debug the code? I am ...
4
votes
2answers
204 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....
1
vote
1answer
197 views

Get the latest version info of all the items in tridion using core service

Using core service want to get only ther latest version of all the items in tridion. I have tried in this way:- if (itemType.Equals("Folder")) { type = ...
0
votes
2answers
153 views

Is there way to call Dreamweaver Mediator from C# TBB in Tridion?

I have Dreamweaver code in one text block as string. What i need is will it be possible to call Dreamweaver mediator from C# TBB and pass the string in text block in Tridion
1
vote
2answers
143 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. ...
2
votes
1answer
112 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 ...
1
vote
1answer
151 views

Tridion Interacting with the Application Monitoring Web service

I need to make some windows service that will monitor Tridion health meaning that it will use Tridion Monitoring service. Inside of documentation on SDL live content there is one section explained: ...
1
vote
3answers
217 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 ...
-3
votes
1answer
75 views

What is the best approach to read the “Component Source” from the CMS

Want to read the Component Source form the Tridion CMS and want to store each component source on the CMS server or local machine How should proceed with it still don't have clear idea which version ...
2
votes
3answers
242 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 ...
3
votes
3answers
407 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 ...
2
votes
1answer
148 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 ...
0
votes
2answers
333 views

How to get the component template web dav url from CME in C#

How to get the component template web dav url from tridion using C#. After fetching that CT url passing to the folder object. Right now i'm using the hard-coded path, but in the future it may won't ...
0
votes
2answers
219 views

How to return the component template id based on the name of the component template

I want to make it generic method if we want to read the component template id based on the component template name for any publication or folders it should work. Need to be done using C# and want to ...
1
vote
1answer
456 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 ...
0
votes
0answers
101 views

How to read the component path field using parameter schema in c#

I want to read the component path using parameter schema and want to assign that parameter schema to the tbb.
0
votes
0answers
112 views

How to read the values from the parameter, embeeded schem in C#

I have created component using schema A it consists of embeedded schema type. The embedded schema has two fields the keyname and keyvalue. Created parameter schema which contain the field called ...
1
vote
1answer
683 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 ...
4
votes
3answers
318 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 ...
3
votes
1answer
395 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 ...
3
votes
2answers
611 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 ...
5
votes
2answers
427 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 ...
7
votes
1answer
623 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 ...
1
vote
2answers
260 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....
3
votes
2answers
117 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/...
5
votes
1answer
1k 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 ...
1
vote
3answers
127 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....
1
vote
2answers
920 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 ...
5
votes
1answer
261 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 ...
8
votes
1answer
300 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 ...
5
votes
2answers
101 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 ...
9
votes
2answers
935 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 (...
3
votes
1answer
453 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 ...
15
votes
4answers
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 ...
8
votes
2answers
460 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")) { ...