There's a possibility to create and use .NetFramework class in PowerShell via cmdlet "Add-Type". You should use New-Object cmdlet to instantiate objects.
There's a possibility to create and use .NetFramework class in PowerShell via cmdlet "Add-Type". You should use New-Object cmdlet to instantiate objects.
Generic handlers have an extension .ASHX. It's a good solution to render documents or images for user on server-side after user requests, not web page. Generic Handlers solution (.ashx files) are not directly supported by Visual Studio 2010 for SharePoint projects. But there's a little trick for this.
Source: a lot of money values returned from SQL as strings. For example, "1500312.32", "2382938.12", "283727361.10" etc.
The task: display money values in format "1 500 312.32", "2 382 938.12", "283 727 361.10", etc.
The task. We have 3 separated text files, for example, web server logs. For more comfortable analyze we want to join them into one file. Below my simple solution for this task in C#.
The main steps of script are: (read more...)
Source: A date in string format, for example, "2015-04-21".
The task: To find a date minus 1 day from the source.
Solution:
(read more...)
Regular expressions is one of the best ways to work with text. One popular task for Regexp is to get a part of word or expression.Let’s try to get first part from word "Heli-copter", the part that before character "-". (read more...)
There’re no associative arrays (hash) in common sense. There are Dictionaries for this. It’s a very good tool if you want to use link "key-value". Using Dictionaries, keys and values can be different types. (read more...)
When I tried to add html to data for my GridView control, I could only see html code. I could see "<span class="myhtmlclass">my text</span> from SQL request</span>. But I wanted to wrap my content with <span> tags. (read more...)
In this post I write some examples of C# coding for SharePoint list items. These methods are rather fast and it's very actual for SharePoint. (read more...)
In this post I'll describe two ways to sort List<T> generic collection by one of it's fields. It's very useful and not easy for beginners. (read more...)