Tuesday 24 September 2013

Hello guys , this is my first tutorial . On this blog , I would be discussing my experiences and code snippets that I have came across till date.

Before starting ASP.net , One must have knowledge of what actually ASP.net is .

ASP stands for Active Server Pages. Before ASP.net , the technology used by Microsoft was ASP for web development.

One must also have knowledge of some other killer languages like Javascript , which is widely used with ASP.net for applying client side validations. Javascript can also be used for handling Server-Side dealings , but mostly it is used for Client-Side purposes.

Let us discuss a very basic program of Javascript. In this program , I will be using javascript for making an alert message on the click  of a div of HTML.


<html>
<head>
<title>Demo alert program</title>
</head>
<body>
    <h1>This is the demo of alert message in Javascript.</h1>
    <div id="myDiv" onclick = "alrtMessage(this.id)">Click me </div>
</body>
</html>


<script type="text/javascript">
    function alrtMessage(id)
    {
         alert("You have clicked "+id);
    }
</script>   


Run the above code , and have a alert message there.

Happy Coding!

No comments:

Post a Comment