Apply sound Effects for validations in aspnet application
Hi friends ,we already know how to set the server side validations for our controls in aspnet applications but this time we will try differently that means In this tutorial i would like to explain how to set sound validations for our Asnet controls when an error occurs.
so lets start...
First Open the visual studio 2008
Next,select one web application
Next,Drag and drop two textboxes and one button from ToolBox
Next,change the properties for textboxes
Now apply the validations for that textbox controls depending up on your requirement
Example apply the Requiredfield Validator for UserName Textbox and at the same apply the sound effect also.
Following is the code for that
<asp:TextBox ID="txt_UserName" runat="server" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
Runat="server" Text="<bgsound src='C:\Windows\Media\Beep.wav'>"
ControlToValidate="txt_UserName" EnableClientScript="False">
</asp:RequiredFieldValidator>
Thats it..
when a user forgets to enter the data in the username field then automatically the necessary sound effect will be fired which was passed in the RequiredField Validator
Depending up on our requirement we need to change the sound effect for validations.that is,apply one sound effect required Field and apply another different soundeffect for Range Validator effect..thats it..
Note:The size of the sound effect file must be max 5 kb .
so lets try my friend...
so lets start...
First Open the visual studio 2008
Next,select one web application
Next,Drag and drop two textboxes and one button from ToolBox
Next,change the properties for textboxes
Now apply the validations for that textbox controls depending up on your requirement
Example apply the Requiredfield Validator for UserName Textbox and at the same apply the sound effect also.
Following is the code for that
<asp:TextBox ID="txt_UserName" runat="server" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
Runat="server" Text="<bgsound src='C:\Windows\Media\Beep.wav'>"
ControlToValidate="txt_UserName" EnableClientScript="False">
</asp:RequiredFieldValidator>
Thats it..
when a user forgets to enter the data in the username field then automatically the necessary sound effect will be fired which was passed in the RequiredField Validator
Depending up on our requirement we need to change the sound effect for validations.that is,apply one sound effect required Field and apply another different soundeffect for Range Validator effect..thats it..
Note:The size of the sound effect file must be max 5 kb .
so lets try my friend...
Labels: .Net Tutorials, Aspnet, C#, CSharp, Tanisha
2 Comments:
Thanks For sharing...
Thanks For sharing...
Post a Comment
Subscribe to Post Comments [Atom]
<< Home