String Extension

Sunny.Sagar
Posted by Sunny.Sagar under ASP.NET AJAX category on | Points: 40 | Views : 488
ASP.NET AJAX client side framework also extends the string type to add support for the .NET like methods.
 <html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Client Side Event in ASP.NET Ajax</title>
<script language="javascript" type="text/javascript">
function pageLoad() {
var string = "Sagar";
alert(string.endsWith("Sunny"));
alert(string.startsWith("M"));
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
ASP.NET AJAX Demo Page
<asp:ScriptManager runat="server" ID="SM1" />
</div>
</form>
</body>
</html>

Comments or Responses

Login to post response