Electronic Screw

.NET :: Do[t]he NET

Filters and Transitions

clock May 2, 2007 15:10 by author gnineth
I have found a good article on using the filters and transitions for use in web pages using the CSS and JavaScript. Check this link http://msdn2.microsoft.com/en-us/library/ms532847.aspx


E Screw

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Filters and Transitions

clock May 2, 2007 10:10 by author gnineth

I have found a good article on using the filters and transitions for use in web pages using the CSS and JavaScript. Check this link http://msdn2.microsoft.com/en-us/library/ms532847.aspx

E Screw

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Enter key on Textbox Control

clock February 11, 2007 10:03 by author gnineth

To enable the enter key on a textbox, to get the functionality of clicking a button, write the javascript. If you have only one button, and by setting the AutoSubmitBehavior to True, you can achieve this, but when you have multiple buttons, when the user press the Enter key, the first focused button is clicked.

With javascript the enter key code can be trapped. The following code will fire the enter key event, on the body.

<body onkeydown="if(event.keyCode == 13){document.getElementById('btnSubmit').click();}">
...
<asp:Button id="btnSubmit" runat="server" Text="Submit"></asp:Button>


If you want to trap the enter key on a textbox use the following

<head>
   <script language="javascript">
       function doEnterKey()
        {
            if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13))
            {
                document.form1.submit();
            }
        }
   </script>
</head>
<body>
   <form id="form1" runat="server">
      <asp:TextBox id="Text1" runate="server" />
   </form>
</body>
</html>

in Page_Load procedure in code-behind file write the following code

submit1.Attributes.Add("onfocus","javascript:doEnterKey();")
Text1.Attributes.Add("onchange","javascript:doEnterKey();")

E Screw

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Search

Calendar

<<  November 2008  >>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

Archive

Tags

Categories


Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in