Wednesday, June 10, 2009

Javascript function to make asp.net control invisible

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript" language="javascript">

function clearingTheLabels()

{

document.body.style.cursor = 'wait';

var lblGoodbad1='<%=lbtGoodBadStatus.ClientID %>';

var lblwordCount='<%=lblWordCount.ClientID %>';

document.getElementById(lblGoodbad1).style.visibility="hidden";

document.getElementById(lblwordCount).style.visibility="hidden";

document.getElementById('<%=grdScorer.ClientID %>').style.visibility="hidden";

}

script>


In Code behind

btnUrlToCrawl.Attributes.Add("onclick", "clearingTheLabels();");



No comments: