Tuesday, October 21, 2008

Using JavaScript to Display messages in ASP.NET pages

<script language="javascript" src="script/ReasonForVisit.js">

or in aspx page

function setmessage()
{
if(language=='english'){
document.getElementById('header1').innerHTML="No Records found.";
document.getElementById('span1').innerHTML="We are unable to find
your records.";

}
else{
document.getElementById('header1').innerHTML="No Records found.";
document.getElementById('span1').innerHTML="We are unable to find
your records.";
}

}

.aspx pages

<table style="width: 100%;" border="0" cellpadding="0" cellspacing="0" id="Table1">
<tr align="center">
<td id="header1">

</td>
</tr>
<tr align="center">
<td id="span1">

</td>
</tr>
</table>

No comments: