Getting ASP.NET Radiobutton list Text using javascript not JQuery

I came accross a problem while I was trying to Get ASP.NET Radiobutton list Text using JQuery. I used the JQuery method $(‘#<%=RadioButtonList1.ClientID%>’).val(); but it was not returning selected value though same works for asp.net Dropdown list then I started searching over the internet but didn’t find any solution. After searching for an hour I [...]

disable submit button on Asp.net using Javascript when user clicks it

  How to disable Submit  button in Asp.net.  Following script will disable the submit button when you click on it so user can not click it again and again. Register following javascript on page load event on which your submit button is. btnSave.ClientID is the button you want to disable when user clicks on it. [...]

Remove extra spaces from string using regular expression, asp.net, c#

Removes extra space from the string using Regular expression. public static readonly RegexOptions Options =          RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline; public string RemoveExtaSpaces(string text) { Regex regex = new Regex(@”\s{2,}”, Options); text = regex.Replace(text.Trim(), ” “); //This line removes extra spaces and make space exactly one. //To remove the  space between the end of a word [...]

Disabling/Enabling asp.net checkboxlist items using javascritp

We  are using  asp.net check box server side control in ajax update panel. These are bind to SQS server.  We were facing a big problem. There were some busineess rule which were implementing on Post back i.e. on selection of check box from list other check box were getting disabled. We wrote some server side script [...]

Modal Popup Extender, AJAX Tool Kit, Validation Controls ASP.NET

I am using Modal popup Extender in my project which after click save button appears and takes Reason for doing that action as an input. I am using a text box labelling Reason for change; if that box is empty I am telling my transaction to roll back. So to make changes appear in database [...]

Power of CLR (Common Language Runtime) + SQL server 2005, Managed Assembly

Today I used Managed Assembly to use Regular Expression in SQL server 2005. I wanted to search for all records which contain special characters in my data and some foreign characters so I was using following SQL Query Select OrganisationId,organisationname from organisation Where organisationname like ‘%-%’ OR OrganisationName like ‘%&%’ OR OrganisationName like ‘%(%’ OR [...]

JavaScript ShowModalDialog + Aspx page_load event not fires

I was using following code to show  Popup window //opens a pop up window function PopupWindow(url) { mywindow =window.open( url, “Popupwindow”, “location=1,status=0,scrollbars=1,width=800, height=600,resizable=1,toolbar=0″ ) Above code was showing Popwindow then Requirement changed and we needed a Modal popup Window.  Then I found followin code which provides required functionality. //opens a pop up window function PopupWindow(url) { var [...]

Fill Array List with All properties of a class

Following Method/function will return list of class properties in an array list. PropertyInfo class is is used to get the properties of the object passed to the method parameter. You may need to add System.Refelection directive in your page. I am using this in my web development. Microsoft c-sharp , .net, .aspx private ArrayList getPropertis(object [...]

Reqular experssion RegEx, C# , asp.net , vb.net

Regular expression: Regular Expression is a great way to manipulate strings for example matching, finding, validating Data, Specailly string manipulaion becames handy while we use reqular expression. We can use Regular expression on both Serer and client side. We do use it with asp.net validation controls. Charcther matching: . ^ $ * + ? { [...]

If you have to provide some services to all users of your website then….

If you have to provide some data or services to all of your web users then best option is to put those data values into applicaiton object. This process will make your application very fast. You can use Global.asax  file and can use  following event.  Following code first puts value into a hashtable and then [...]