Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View lazycoder-razor.cshtml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
@TextSearchField("test", "test", true)
 
@helper TextSearchField(string name, string label, bool autocomplete)
{
<div class="searchCrit">
<label for="@name">@label</label>
@if(autocomplete) {
<input type="text" name="@name" class="autocompleteField" />
}
else {
<input type="text" name="@name" />
}
 
</div>
}
View lazycoder-razor.cshtml
1 2 3 4 5 6 7 8 9 10 11
<div class="searchCrit">
 
<label for="test">test</label>
 
 
<input type="text" name="test" class="autocompleteField" />
 
 
 
</div>
Owner

If you remove the "@" in front of the "if" or remove the closing characters on the both cause it to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.