In this blog I will explain how to get all ids of div tags in particular div ,means to get all controls id in a particular element. I have used map method of jQuery. Below is the code snippet for it: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1...
In this blog I will explain how to bind events to controls except one control with jQuery .In some requirements we have to bind a event suppose keydown to all textboxes except a particular textbox and on that particular textbox we want to have different functionality on keydown event. Below is the code snippet for it: < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="...
In this blog I will explain how to escape single quotes with regular expression in javascript. There are issues when we have single quotes with in string in javascript. Below is the code snippet. Escaping only one single quote. < html xmlns ="http://www.w3.org/1999/xhtml"> < head id ="Head1" > < title ></ title > </ head > < body > < div > </ ...
In this blog I will show you how to rename a column name in sql. The syntax for renaming the column is EXEC SP_RENAME @objname = 'table_name.old_column_name', @newname = 'new_column_name', @objtype = 'COLUMN' According to the msdn: "sp_rename" Changes the name of a user-created object in the current database. This object can be a table, index, column, alias data type, or Microsoft .NET F...
In this blog i will explain the difference between obj.ToString() vs Convert.ToString(obj) vs (string)obj vs obj as string obj.ToString() .ToString() can be called from any object. It returns a string that represents the current Object. ToString() is a method of object, and it will always work on a non-null reference. For example: object str = "test string" ; string newTestString = str.T...
In this blog I will show how to disable enter key with jQuery. In many scenarios we need to disable the enter key on a input textbox so that the click event of default button set should not get fired. Below is the source code for it : <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="http://aja...
Normal 0 false false false EN-US X-NONE X-NONE In this blog I will explain how check a directory exists or not.I have used Directory class Exists method to explain it.Below is the code snippet. using System; using System.IO; namespace ConsoleApplication1 { class Program { static void Main( string [] args) { bool folderExists = Directory .Exists( @"c:\windows" ); } } } Above i have passed...
Normal 0 false false false EN-US X-NONE X-NONE In this blog I will explain how to hide mouse cursor with jQuery. I am explaining with an example where we have to hide mouse cursor when mouse is over a particular div below is the code snippet to explain it. < html xmlns ="http://www.w3.org/1999/xhtml"> < head > < title ></ title > < script type ="text/javascript...
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 In this blog I will explain how to convert scientific number to floating point number. I have used one of the overloaded method of Double.Parse. Below is the code snippet: using System; using System.Globalization; namespace ConsoleApplication1 { class Program { static void Main( string [] args) { double number= Dou...
Normal 0 false false false EN-US X-NONE X-NONE In this blog I will explain how to make a input field readonly with jQuery.Below is the code snippet: < html xmlns ="http://www.w3.org/1999/xhtml"> < head > < title ></ title > < script type ="text/javascript" src ="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></ script > </ head >...
Normal 0 false false false EN-US X-NONE X-NONE In this blog I will explain how check a website folder exists or not.I have used Directory class Exists method to explain it.Below is the code snippet. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO ; public partial class How_to_chek_a...
It's fast, easy and free! Submit articles, get your own blog, ask questions & give answers in the forums, and become a better developer, faster.
enter your email address:
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18