Reputation: 223
How to write javascript code on asp.net page such as (input box) to get value in a better manner .... or another controls message boxes (alert,confirm,...... (please if you can, give me an example? )
Upvotes: 0
Views: 778
Reputation:
as you would on a "normal" html page :)
you can enhance your scripts - no, sometimes you MUST - with eg.
<%= this.inputBox.ClientID %>
i would recommend jQuery for such enhancements ... its feature rich, easy to learn, ...
you could do eg.
var $inputBox = $('#<%= this.inputBox.ClientID %>');
$inputBox.hide();
var oldValue = $inputBox.val();
$inputBox.val('now it has no value');
.. and many more!
there are many tutorials on the net... to give a very rough overview, try this
Upvotes: 1