Professional Documents
Culture Documents
My Mat For Web Application
My Mat For Web Application
Real live or in your test situation, in the last situation the answer is no,
there was another question about this that I answered today and I forget
that I had planned to do this to you to when I tested that, I did not see
it.
The screen was as flat as flat could be with this code (I filled the
collection with 6 items and no values)
\\\
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load sponsor content
If Not IsPostBack Then
Me.DropDownList1.AutoPostBack = True
End If
End Sub
Private Sub DropDownList1_SelectedIndexChanged _
(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles DropDownList1.SelectedIndexChanged
TextBox1.Text = DropDownList1.SelectedItem.ToString
End Sub
///
Maybe this helps still something
Cor
Or I you want to use Java Script then onKeyPress event of the text box you can call a
Sample Code:
<HTML>
<HEAD>
<SCRIPT language=Javascript>
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<asp:TextBox ID="TextBox1" runat="server" onKeypress="return
isNumberKey(event)" />
</BODY>
</HTML>
This code wont allow alphabets
http://msdn2.microsoft.com/en-us/library/aa479568.aspx