Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@roboriaan
roboriaan / validation.html
Created March 11, 2016 09:19
Form validation example
<form asp-action="AddNewRole" asp-controller="Admin">
<div asp-validation-summary="ValidationSummary.ModelOnly"></div>
<div class="color-line"></div>
<div class="modal-header">
<h4 class="modal-title">Add new role</h4>
<small class="font-bold"></small>
</div>
<div class="modal-body">
<div class="panel-body">
<div class="form-group">
@roboriaan
roboriaan / gist:f65a276c865ff6a363ba4c152830cda1
Created June 15, 2016 07:45
Read custom metadata from AndroidManifest.
// Nowhere on the internet does this exist because of the total hacking nature, bad documentation and cowboy gippo coding of the java to .net port. Inconsistent placing of various functions, enums, and members.
var t = PackageManager.GetApplicationInfo(PackageName, Android.Content.PM.PackageInfoFlags.MetaData);
Bundle b = t.MetaData;
//Manifest
// <application android:label="@string/app_name" android:icon="@drawable/Icon" android:theme="@style/MyTheme">
// <meta-data android:name="ApplicationVersion" android:value="10.0.0.2" />
// </application>