Textbox should not contain special character using JavaScript

Call Javascript function on “onkeyup” event of TextBox function valid(field) { var txt = document.getElementById(‘TextBox1′).value; var iChars = “!@$%^&*()+=-[]\\\’;,./{}|\”:?~_”; for (var i = 0; i < txt.length; i++) { if (iChars.indexOf(txt.charAt(i)) != -1) { alert(“Your string has special characters. \nThese are not allowed.”); document.getElementById(‘TextBox1′).value = txt.substring(0, txt.length – 1); return false; } } } function …

Windows 7 couldn’t connect to work group server

Browse to “Local Policies” -> “Security Options”. Now look for the entry “Network Security: LAN Manager authentication level” and open it. Click on the dropdown menu and select “Send LM & NTLM – use NTLMv2 session security if negotiated”. Apply the settings. In the Advanced sharing settings page of Network and sharing center, you need …

Service Unavailable

IIS 6.0 supports both the 32-bit mode and the 64-bit mode. However IIS 6.0 does not support running both modes at the same time on a 64-bit version of Windows. ASP.NET 1.1 runs only in 32-bit mode. ASP.NET 2.0 runs in 32-bit mode or in 64-bit mode. Therefore, if you want to run ASP.NET 1.1 …

SSL connection iphone

Here I have posted code how to calling “Web service” which are SSL enabled. like “https://test.com/testservice.svc/gettest” #import “Hello_SOAPViewController.h” @interface NSURLRequest (withHttpsCertificates) + (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host; + (void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString*)host; @end @implementation Hello_SOAPViewController NSMutableData *webData; – (void)viewDidLoad { ////////////////////////////////////////////////// //Web Service Call ////////////////////////////////////////////////// NSURL *url = [NSURL URLWithString:@”https://test.com/testservice.svc/gettest”]; NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0]; [NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:[url host]]; …

Upload Photo From iPhone to Asp.Net Server PHP

This tutorial will go over the HTML post. This will start off where Using a UIImagePickerController left off. So you can grab the code and start there if you want. So lets begin. So first open up testPickerViewController.h and we want to add in one outlet and one action. So here is the outlet we …

SQL split funtion

ex. 1. select top 10 * from dbo.split(‘Chennai,Bangalore,Mumbai’,’,’) Link: http://blog.logiclabz.com/sql-server/split-function-in-sql-server-to-break-comma-separated-strings-into-table.aspx

JSON ASP.NET Web Services with jQuery

using System; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; using System.Web.Script.Services; using System.Collections.Generic; using System.Linq; public class Employee { public string firstname; public string lastname; public int age; } /// /// Summary description for Employeeservice /// [WebService(Namespace = “http://tempuri.org/”)] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ScriptService] public class Employeeservice : WebService { List Employees = new List{ new Employee{firstname=”Aamir”,lastname=”Hasan”,age=20}, …

JSON ASP.NET Web Services with JavaScript

——————————————WebForm1.aspx—————————————— // This function calls the Web service method // passing simple type parameters and the // callback function function CallWebMethod() { // debugger; var User_Name = document.getElementById(”).value; checkDuplicateUserName.WebService1.CheckDuplicate(User_Name, OnSucceeded, OnError); } // This is the callback function invoked if the Web service // succeeded function OnSucceeded(result) { var rsltElement = document.getElementById(“lblDuplicate”); rsltElement.innerHTML = “”; …