//Check if a valid employee reference is returned from the server strHTML = “<font color=’#0000FF’>”; if (objEmployee != null) { |
//Dynamically generate HTML and append the contents strHTML += “<br><br>Employee ID :<b>” + |
objEmployee.selectSingleNode(“EmployeeID”).text + “</b><br><br>”; |
strHTML += “Title:<b>” + |
objEmployee.selectSingleNode(“Title”).text + “</b><br><br>”; |
strHTML += “Hire Date :<b>” + |
objEmployee.selectSingleNode(“HireDate”).text + “</b><br><br>”; |
strHTML += “Gender:<b>” + |
objEmployee.selectSingleNode(“Gender”).text + “</b><br><br>”; |
strHTML += “Birth Date:<b>” + |
objEmployee.selectSingleNode(“BirthDate”).text + “</b><br><br>”; |
} else { |
strHTML += “<br><br><b>Employee not found</b>”; |
} strHTML += “</font>” //Assign the dynamically generated HTML into the div tag divContents.innerHTML = strHTML; |
} |
function DisplayErrorCallback( error, context ) { |
alert(“Employee Query Failed. “ + error); |
} |
</script> |
</head> <body> |
<form id=”Form1” runat=”server”> |
<font color=”#800080”><H1>Employee Details</H1></font> <br><br> <P align=”left”> |
<font color=”#800080”><b>Enter the Employee ID:</b> </font> <INPUT id=”txtEmployeeID” name=”txtEmployeeID” |
style=”LEFT: 149px; TOP: 72px”> |
<INPUT id=”btnGetEmployee” type=”button” value=”Get Employee Details” |
name=”btnGetEmployee” onclick=”GetEmployeeDetails()”> |
</P> <P></P> <div id=”divContents”> </div> <P></P> |
</form> |
</body> |
learn guitarphysics learnteliphonyxmlphysicsenjoylife