Skip to content

Instantly share code, notes, and snippets.

View lohithgn's full-sized avatar

Lohith lohithgn

View GitHub Profile
@lohithgn
lohithgn / customcontrol2.cs
Created February 3, 2013 11:35
Placeholder public property on custom control class
string _placeholder = "enter value";
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("enter value")]
[Localizable(true)]
public string Placeholder
{
get
{
@lohithgn
lohithgn / customcontrol3.cs
Created February 3, 2013 11:37
add attribute to render example
protected override void AddAttributesToRender(HtmlTextWriter writer)
{
writer.AddAttribute("placeholder", _placeholder);
base.AddAttributesToRender(writer);
}
@lohithgn
lohithgn / registertag.html
Created February 3, 2013 11:39
register custom control tag example
<%@ Register Assembly="HTML5WebFormsCustomControlLibrary"
Namespace="HTML5WebFormsCustomControlLibrary"
TagPrefix="kashyapa" %>
@lohithgn
lohithgn / webform.html
Created February 3, 2013 11:41
custom control consumption example
<kashyapa:Html5TextBox ID="txtName"
runat="server"
TextMode="SingleLine"
Width="300px"
Placeholder="enter your name">
</kashyapa:Html5TextBox>
<kashyapa:Html5TextBox ID="txtEmailAddress"
runat="server"
Width="300px"
@lohithgn
lohithgn / KendoEditor-BasicUsage.cshml
Created March 26, 2013 09:19
Kendo Editor MVC Wrapper Basic Usage
@(
Html.Kendo().Editor()
.Name("kEditor")
.HtmlAttributes(new {style="width:740px;height:440px"})
)
@lohithgn
lohithgn / KendoEditor-AllToos.cshtml
Created March 26, 2013 10:42
All Tools on Kendo Editor code
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.SubScript()
.SuperScript()
)
.HtmlAttributes(new {style="width:740px;height:240px"})
)
@lohithgn
lohithgn / KendoEditor-ToolsOptions.cshtml
Created March 26, 2013 10:53
Kendo Editor Tools Option Code
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.Clear()
.FontName()
.FontSize()
.FontColor()
.BackColor()
)
@lohithgn
lohithgn / KendoEditor-CustomButton.cshtml
Created March 26, 2013 11:38
Kendo editor custom button feature
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.Clear()
.FontName()
.FontSize()
.FontColor()
.BackColor()
.CustomButton(cb => cb
@lohithgn
lohithgn / KendoEditor-Snippet.cshtml
Created March 26, 2013 12:32
Kendo Editor Snippet Feature
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.Clear()
.Snippets(snippets => snippets
.Add("Signature","<p>Regards,<br /> Lohith G N,<br /><a href='mailto:lohith.nagaraj@telerik.com'>lohith.nagaraj@telerik.com </a></p>")
.Add("Kendo Online Demos"," <a href='http://demos.kendoui.com'>Kendo online demos</a> ")
)
)
@lohithgn
lohithgn / KendoEditor-CustomStyles.cshtml
Created March 26, 2013 13:21
Kendo Editor Custom Style Feature
<!--Editor Styles-->
.hlError
{
background-color:#fea;
color:#f33;
}
.hlOK
{
background-color:#aef;