I was given asn assignment to change theb back ground image of the parent page for a pop up window which as being opened using JQuery color box pluging. The pop up page was being opened in an iFrame (html tag). In Iframe we had a div with the Id and also we had the [...]
Recently I was given a problem that UK Mobile phone numbers with spaces in the number are not being accepted by application as its convenient to write numbers like (+44 0791 452 1234 OR “0791 452 1234″) instead (+447914521234 OR 07914521234) (dummy number used for illustration purpose only). UK mobile numbers are of 11 digit [...]
Often you want to debug a website hosted in IIS from your visal studio. Requirement: Visual Studio, Website (you want to debug) must have the same source code. Now web browser (Internet explorer, Firefox , Google chrome etc) type the URL of your website hosted in IIS (Internet Infomration Server). Open the Source code in [...]
The other day I copied a working website solution onto a different machine and attempted to compile and run it in debug mode. It compiled fine and started to run, the browser attempted to load the page up in debug mode running of a port (as is normal), but then I got a Page Not [...]
Have you ever wanted to sort an ASP.NET drop down list, and tried to search for DropDownList1.Sort in the intellisense? How dissapointing that Microsoft did not supply this. Below I show you how to implement a SortDropDownList function that will allow you to achieve this functionality: public void SortDropDownList(DropDownList dropDownList) //Listbox too { ArrayList arrayList [...]
Most sources tell you that formating a column in a GridView is simple, all you need to do is use the DataFormatString Property like so: <asp:boundcolumn datafield=”Amount” headertext=”Amount” dataformatstring=”{0:c}”> However you may find that the currency format is not working in the GridView, this is because the GridView’s columns are being Html Encoded. A simple [...]
Recently I had a task that involved unencrypting an encrypted query string that had been encrypted on the front end using JQuery’s RC4 encryption located in file: JQuery.rc4.js. I needed to un-encrypt the encrypted string in the c# code-behind: Below is a line for line port of the JQuery.rc4.js. library functions I needed. I made [...]
Highlight asp.net text box when it gets focus. When your cursor will focus on text box it will be surrounded by a red rectangle when cursor leaves text it becomes normal. If coursor goes to button or dropdown list they dont get any style the behave as normal. This code is ony tested in IE7. [...]
How to populate asp.net drop down list from database by passing radio button list’s selected value as parameter with J Query, J Son? In my project I am taking off asp.net update panel where ever possible and replacing it with J Query Ajax. J Query Ajax is far better then asp.net Ajax and asp.net update [...]
Validating web site address at server side in asp.net using c-sharp. A detail web site address validation method where Regular expression is being used for a baisc web addrss validation, then web address is being splitted by dot and forward slash to check if it contains http: and if its defined more than once in [...]