I've created an extension class for Textbox as follows:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MyApplication.App_Code
{
public class DateTextBox : TextBox
{
protected override void OnPreRender(EventArgs e)
{
//this is what iwant to do :
//((TextBox)sender).Attributes.Add("placeholder", "dd/mm/yyyy");
base.OnPreRender(e);
}
}
}
I need to add a "placeholder" attribute to the textbox control on prerender, but i'm not sure about how to reference the sender textbox control.