You are currently browsing the daily archive for February 25, 2011.

[WebMethod]
public static string FolderNameExist(string name, string id) {
DbFunctions db = new DbFunctions();
SqlCommand cmd = new SqlCommand(“SELECT * FROM Table”);

string result = db.ExecuteScalar(cmd);
return result == “0″ ? “OK!” : “*Folder name exist.”;

}

$.ajax({
type: “POST”,
url: “/FolderMgt.aspx/FolderNameExist”,
data: “{ \”name\” : \”" + $textbox.val() + “\”, \”id\” : \”" + $(“#hidId”).val() + “\” }”,
contentType: “application/json; charset=utf-8″,
dataType: “json”,
success: function(response) {
$span.html(response.d);
},
error: function(result) { alert(result.status + ‘ ‘ + result.statusText); }
});

var regWordonly = /[^a-zA-Z0-9_\-]/g;
text = text.replace(regWordonly, “”);

 

February 2011
S M T W T F S
« Nov   Mar »
 12345
6789101112
13141516171819
20212223242526
2728  

Pages

Top Clicks

  • None
Follow

Get every new post delivered to your Inbox.