Chandra Oemaryadi has written 244 articles

ASP MVC Iframe Cross Domain

Kasus: meng-embed halaman dari web lain (TSIS) ke dalam web kita (TS.LIA) menggunakan iframe. Masalah: akan muncul error cross domain Solusi: Iframe di TS.LIA meng-embed dari url TS.LIA, url tersebut me-load content dari TSIS. [code language=”javascript”] iframe = document.createElement(‘iframe’); $(iframe).addClass(‘fullwidth’).prop(‘id’, ‘project-iframe’); $(iframe).addClass(‘fullwidth’).prop(‘frameBorder’, ‘0’); iframe.onload = onFrameLoad; // before setting ‘src’ iframe.src = ‘@Url.Action("Iframe")’; //iframe.src =…

ASP MVC5 Allow HTML

Berikut adalah  cara supaya user bisa input html di dalam form (misalnya menggunakan wysiwyg editor) di MVC 5. Jika MVC4 tidak perlu [outputcache] [code language=”csharp”] public class FooModel { //other properties [AllowHtml] public string BarField { get; set; } } [/code] [code language=”csharp”] [OutputCache(NoStore = true, Duration = 0, Location = OutputCacheLocation.None)] public class FooController…

SQL Server Concat String

Contoh query di SQL server untuk concat string di tabel one-to-many [code language=”sql”] select b.program_name, b.status, STUFF(( SELECT ‘ ‘ + department FROM order_assigned_departement WHERE (order_assigned_departement.order_id = b.id) FOR XML PATH (”)) , 1, 1, ”) AS department, b.submitted_date, group_id from [order] b where year(submitted_date) = 2017 and month(submitted_date) = 10 and b.cancellation_status is null…

Visual Studio Missing References

Jika references hilang seperti di bawah ini: Solusinya sebagai berikut: Whenever you import a project to Visual Studio it modifies your .csproj. So, in order to fix it. Right click on .csproj and open it in notepad or any editor and delete the following [code language=”xml”] <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> <ErrorText>This project references NuGet package(s)…

Alfresco Cannot Login

Login Alfresco dilakukan melalui link ini: http://127.0.0.1:8080/share Jika Anda tidak bisa login, pastikan Alfresco sudah berjalan dengan membuka link ini: http://127.0.0.1:8080/alfresco Jika link /alfresco tidak dapat dibuka, cek file “[alfresco_path]\tomcat\logs\catalina.xxx.log”, kemungkinan ada error seperti di bawah ini SEVERE: Context [/alfresco] startup failed due to previous errors Untuk mengecek masalah ketika melakukan startup Alfresco, cek file…