C# .NET - javascript__
Asked By ricky ponting
10-Feb-12 02:40 AM
Hi
plz send the code without accepting ( !,@,#,$,%,^,&,*(,),_) these characters
Sreekumar P replied to ricky ponting
Hi,
Try this code
<head runat="server">
<title></title>
<script type="text/javascript">
function valid(f) {
!(/^[A-zÑñ0-9]*$/i).test(f.value) ? f.value = f.value.replace(/[^A-zÑñ0-9]/ig, '') : null;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" onkeyup="valid(this)" onblur="valid(this)" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>
kalpana aparnathi replied to ricky ponting
hi,
Try this below function
var isShift = false;
function keyUP(keyCode)
{
if(keyCode==16)
isShift = false;
}
function isAlphaNum(keyCode)
{
if(keyCode==16)
isShift = true;
return ((keyCode >= 65 && keyCode <= 90) || ((keyCode == 8 || keyCode == 32 || keyCode == 190 || keyCode == 189 || keyCode == 191 || keyCode == 109 || keyCode == 111 || (keyCode >= 48 && keyCode <= 57) || (keyCode >= 96 && keyCode <= 105)) && isShift==false))
}
Somesh Yadav replied to ricky ponting
Hi try the below one.
function valid(f) {
!(/^[A-zÑñ0-9]*$/i).test(f.value) ? f.value = f.value.replace(/[^A-zÑñ0-9]/ig, '') : null;
Reena Jain replied to ricky ponting
hi,
using javascript here is the code for you
var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
for (var i = 0; i < document.formname.fieldname.value.length; i++) {
if (iChars.indexOf(document.formname.fieldname.value.charAt(i)) != -1) {
alert ("Your username has special characters. \nThese are not allowed.\n Please remove them and try again.");
return false;
}
}
using asp.net regular expression here is the code for you
<asp:RegularExpressionValidator ID="rgv" ResourceName="rgv"
ValidationGroup="valGroup" runat="server" ControlToValidate="txtState" ErrorMessage="Please enter valid data."
ValidationExpression="([a-z]|[A-Z]|[0-9]|[ ]|[-]|[_])*"></asp:RegularExpressionValidator>
hope this will help you

that to the second statement it becomes null Can somebody help me on this? using (Microsoft.Win32.RegistryKey sqlServerKey = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, <My Machine name> ).OpenSubKey(@"SOFTWARE \ Microsoft \ Microsoft SQL Server \ <Instance Name of the sql server> \ MSSQLServer \ CurrentVersion")) using (Microsoft.Win32.RegistryKey sqlServerKey Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, <My Machine name> ).OpenSubKey(@"SOFTWARE \ Microsoft \ Microsoft SQL Server \ <Instance Name of
2011 19:10:25.0731] [0] * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * [11 / 17 / 2011 19:10:25.0731] [0] Starting Microsoft Exchange Server 2010 Setup [11 / 17 / 2011 19:10:25.0731] [0] * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * [11 / 17 / 2011 Central Time (US & Canada). [11 / 17 / 2011 19:10:25.0731] [0] Operating System version: Microsoft Windows NT 6.1.7601 Service Pack 1. [11 / 17 / 2011 19:10:25.0731 17 / 2011 19:10:27.0135] [0] Exchange configuration container for the organization is 'CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27.0135] [0] Exchange organization container for the organization is 'CN = First Organization, CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27 EXCHANGE, CN = Servers, CN = Exchange Administrative Group (FYDIBOHF23SPDLT), CN = Administrative Groups, CN = First Organization, CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27 EXCHANGE, CN = Servers, CN = Exchange Administrative Group (FYDIBOHF23SPDLT), CN = Administrative Groups, CN = First Organization, CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27 15. [11 / 17 / 2011 19:11:17.0415] [0] Exchange Installation Directory : 'F: \ Program Files \ Microsoft \ Exchange Server \ V14'. [11 / 17 / 2011 19:11:17.0446] [0] Applying default role selection 17 / 2011 19:11:17.0477] [0] Setup will run from path 'F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ '. [11 / 17 / 2011 19:11:17.0493] [0] InstallModeDataHandler has 0 DataHandlers
2011 19:10:25.0731] [0] * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * [11 / 17 / 2011 19:10:25.0731] [0] Starting Microsoft Exchange Server 2010 Setup [11 / 17 / 2011 19:10:25.0731] [0] * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** * [11 / 17 / 2011 Central Time (US & Canada). [11 / 17 / 2011 19:10:25.0731] [0] Operating System version: Microsoft Windows NT 6.1.7601 Service Pack 1. [11 / 17 / 2011 19:10:25.0731 17 / 2011 19:10:27.0135] [0] Exchange configuration container for the organization is 'CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27.0135] [0] Exchange organization container for the organization is 'CN = First Organization, CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27 EXCHANGE, CN = Servers, CN = Exchange Administrative Group (FYDIBOHF23SPDLT), CN = Administrative Groups, CN = First Organization, CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27 EXCHANGE, CN = Servers, CN = Exchange Administrative Group (FYDIBOHF23SPDLT), CN = Administrative Groups, CN = First Organization, CN = Microsoft Exchange, CN = Services, CN = Configuration, DC = mr238, DC = org'. [11 / 17 / 2011 19:10:27 15. [11 / 17 / 2011 19:11:17.0415] [0] Exchange Installation Directory : 'F: \ Program Files \ Microsoft \ Exchange Server \ V14'. [11 / 17 / 2011 19:11:17.0446] [0] Applying default role selection 17 / 2011 19:11:17.0477] [0] Setup will run from path 'F: \ Program Files \ Microsoft \ Exchange Server \ V14 \ '. [11 / 17 / 2011 19:11:17.0493] [0] InstallModeDataHandler has 0 DataHandlers
When was the first version of Microsoft SQL Server released? This explains the first version of SQL Server release from Microsoft. Microsoft released its first version of SQL Server in the year of 1988 . This version was developed jointly by Microsoft and Sybase for the OS / 2 platform. Related FAQs What is Denali? This explains about Stored Procedures and functions in SQL Server 2008 R2. When was the first version of Microsoft SQL Server released? ( 130 Views ) View Santhosh N's FAQs Create New Account keywords: Microsoft, SQL Server, first, version, 1988, Sybase, release description: This explains the first version of SQL Server release from Microsoft.
Next Microsoft’s Windows OS Release in 2012? This briefs you about the next probable Windows OS (Windows 8) release from Microsoft. Microsoft might release its next Windows OS with the name Windows 8 could be released sometime the main functionalities that are handled by WWW service in IIS 6 and prior versions. Microsoft .Net Framework introduced for developers This explains when .Net Framework introduced to the developers and operating systems This explains and lists four major operating systems used in the mobiles Next Microsoft’s Windows OS Release in 2012? ( 242 Views ) View Santhosh N's FAQs Create New Account keywords: Microsoft, Windows 8, OS, release, 2012, APP STORE, performance, sleep, mode description: This briefs you about the next probable Windows OS (Windows 8) release from Microsoft.