Skip to content

Instantly share code, notes, and snippets.

Avatar

Lohith lohithgn

View GitHub Profile
@lohithgn
lohithgn / customcontrol2.cs
Created Feb 3, 2013
Placeholder public property on custom control class
View customcontrol2.cs
string _placeholder = "enter value";
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("enter value")]
[Localizable(true)]
public string Placeholder
{
get
{
@lohithgn
lohithgn / customcontrol3.cs
Created Feb 3, 2013
add attribute to render example
View customcontrol3.cs
protected override void AddAttributesToRender(HtmlTextWriter writer)
{
writer.AddAttribute("placeholder", _placeholder);
base.AddAttributesToRender(writer);
}
@lohithgn
lohithgn / registertag.html
Created Feb 3, 2013
register custom control tag example
View registertag.html
<%@ Register Assembly="HTML5WebFormsCustomControlLibrary"
Namespace="HTML5WebFormsCustomControlLibrary"
TagPrefix="kashyapa" %>
@lohithgn
lohithgn / webform.html
Created Feb 3, 2013
custom control consumption example
View webform.html
<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 Mar 26, 2013
Kendo Editor MVC Wrapper Basic Usage
View KendoEditor-BasicUsage.cshml
@(
Html.Kendo().Editor()
.Name("kEditor")
.HtmlAttributes(new {style="width:740px;height:440px"})
)
@lohithgn
lohithgn / KendoEditor-AllToos.cshtml
Created Mar 26, 2013
All Tools on Kendo Editor code
View KendoEditor-AllToos.cshtml
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.SubScript()
.SuperScript()
)
.HtmlAttributes(new {style="width:740px;height:240px"})
)
@lohithgn
lohithgn / KendoEditor-ToolsOptions.cshtml
Created Mar 26, 2013
Kendo Editor Tools Option Code
View KendoEditor-ToolsOptions.cshtml
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.Clear()
.FontName()
.FontSize()
.FontColor()
.BackColor()
)
@lohithgn
lohithgn / KendoEditor-CustomButton.cshtml
Created Mar 26, 2013
Kendo editor custom button feature
View KendoEditor-CustomButton.cshtml
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.Clear()
.FontName()
.FontSize()
.FontColor()
.BackColor()
.CustomButton(cb => cb
@lohithgn
lohithgn / KendoEditor-Snippet.cshtml
Created Mar 26, 2013
Kendo Editor Snippet Feature
View KendoEditor-Snippet.cshtml
@(
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 Mar 26, 2013
Kendo Editor Custom Style Feature
View KendoEditor-CustomStyles.cshtml
<!--Editor Styles-->
.hlError
{
background-color:#fea;
color:#f33;
}
.hlOK
{
background-color:#aef;