ASP.NET – How to format Currency in GridView

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 […]

Dual asp.net list boxes and jquery

Move selected item to the left hand side list box, move all items to the left hand side list box, move selected item to the right hand side list box, and move all items to the right hand list box.  Let’s   implement above features using JQuery. ASP.NET Code <div style=”float: left;”> <asp:ListBox ID=”ListBox1″ runat=”server” Height=”550px” […]

Asp.net, javascript, JQuery

Comments Off on Highlight dot net form text box onfocus using jquery

Highlight dot net form text box onfocus using jquery

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. […]

Few jquery errors , Attention J Query Gurus, invalid label

Attention J Query Gurus J Query gurus can you put some light on this matter please? I am using J Query method for Ajax calls in my asp.net projects $.ajax({ type:”POST”, url:”WebService/WsCountry.asmx/getCountryList”, data:”{optionvalue:’”+checkedValue+”‘}”, contentType:”application/json; charset=utf-8″, datatype:”json”, success:function(response) In above I am using “datatype”  as small characters, its working 100%  for me in one project  also […]

How to populate asp.net dropdown list from database by passing radio button list’s selected value as parameter with JQuery?

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 […]

Validation of web site address on server side using c-sharp and Regular expression

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 […]

Why onfocusout event is not firing in firefox

Why onfocusout event is not firing in firefox I was using onfcousout event of text box to fire some javascript those were firing in IE but were not firing in Firefox. Then  I found that onblur is firing on both Internet Explorer. So do not use onfocusout event instead use onblur. Tested on I.E 7.0 […]

How to disable Asp.net Button with Jquery?

How to disable Asp.net Button with JQuery? Following java script function disables an asp.net button. Tested in IE 7 <asp:Button ID=”Button1″ runat=”server”  Text=”Disable me” OnClientClick=”disAbleMe()” /> function disAbleMe() { $(“#<%=Button1.ClientID %>”).attr(“disabled”,”true”); } You can try other attributes too.

Json, Jquery, $.ajax(), asp.net and c# to get ajaxed data table rows passing multiple parameters

Json, Jquery, $.ajax(), asp.net and c# to get ajaxed data table rows passing multiple parameters I got a request from my client that before creating user they want to see the list of existing users with the like first name and last name. I didn’t want to use asp.net ajax update panel and full post […]

How to Use JQuery $.ajax() with Asp.net Dropdown list onchange event.

How to Use JQuery $.ajax() (AJAX) with Asp.net Drop down list’s “onchange” event and pass selected value as parameter. To perform above you need Jquery library, click on downloads to see where you can get Jquery. Following is the working example in which I am selecting a role from asp.net dropdown list and for that […]