Questions tagged [c#]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
31 views

How to replace a link break (&#xa) with a comma using Regex

One of our clients have asked us to replace the first line break (&#xa) with a comma. So far the regex that we have for our location address is this: Location = vacancy.Location.IsNullOrEmpty()...
user13705's user avatar
1 vote
2 answers
68 views

how to get rendering variant using c#

I have a list of renderings used in an item. I used below code Sitecore.Layouts.RenderingReference[] renderings = null; renderings = Sitecore.Context.Item.Visualization.GetRenderings(Sitecore.Context....
Vinesh's user avatar
  • 117
1 vote
0 answers
49 views

How to retain the session value in sitecore 10.2

How to retained the session, when i clicked the media url session is null. I have developed external based authentication, I stored value on session, When i clicked the media url or Pdf url(used ...
Hasanshali's user avatar
1 vote
1 answer
284 views

What is missing in my setup of a Custom Error Handler in Sitecore 10

I was tasked with trying to set up a simple static cshtml page that would avoid the yellow screen sent by the .net framework. I built a class library that has a controller and a view. controller: ...
Paul T. Rykiel's user avatar
0 votes
2 answers
91 views

How to get child items specific format

I need show the product and Version from the below folder structure. Please help to achieve on this. Requirement Screen Shot Sitecore Folder Structure So far I wrote some code for review var item = ...
Hasanshali's user avatar
0 votes
1 answer
195 views

Multiple OpenIdConnectAuthentications in ASP.NET Framework Authentication Types

I'm trying to use two separate OpenIDConnect auth options in my ASP.NET Framework app. In my IdentitySetup I register two Auth methods: app.UseOpenIdConnectAuthentication(new AuthOptionsOne()); app....
Ollie Armitage's user avatar