<script type="text/javascript">
function DisableJQueryCalendar()
{
$('#<%=TextBox1.ClientID %>').datepicker('disable');
}
function EnableJQueryCalendar()
{
$('#<%=TextBox1.ClientID %>').datepicker('enable');
}
</script>
protected void btnClick(object sender,EventArgs e)
{
if(con==true)//When Condn true then Disable Calendar
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "com", "DisableJQueryCalendar()", true);
}
else //enable Calendar
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "com", "EnableJQueryCalendar()", true);
}
}
Примечание: - Здесь ... мы пытаемся отключить текстовое поле, а не изображение ... потому что ... изображение не содержит свойство runat = "server" ...