Monday, July 1, 2013

Windows: Fix C:\Progra~1\Google\GOOGLE~2\GOEC62~1.DLL Bad image error message on windows application startup

Download the Autoruns utility  http://live.sysinternals.com/autoruns.exe and Run the apllication (as prompted).
Go to the "AppInit" tab  then search for a file with something like "\GOEC62~1.DLL. Or Browse~1.dll
Right click on this file, and Delete.

Restart the system & error has been fixed

Wednesday, June 12, 2013

Fix GridView OR DatGrid Column value to 2 decimal (20.00) position in JQuery

<script>
   $(function() {
   $('.jqFix2').each(function () {
$(this).html(($(this).text() * 1.0).toFixed(2));
});
</script>

DataGrid 
<asp:DataGrid ID="dgCopay" runat="server
AllowSorting="True" ShowHeader="True" BackColor="White" CellPadding="3" AutoGenerateColumns="False">
<Columns>
 HeaderText="Total" HeaderStyle-CssClass="HeaderStyle" HeaderStyle-ForeColor="White"
HeaderStyle-HorizontalAlign="center" ItemStyle-CssClass="ItemStyle" ItemStyle-HorizontalAlign="right">
<ItemTemplate>
<asp:Label ID="Label19" runat="server" style="Width:50px" CssClass="jqFix2">
<%# DataBinder.Eval(Container.DataItem,"total") %></asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid >

Monday, June 10, 2013

Search whole page & replace text in JQuery

      $('*:contains("00%")').each(function(){
      if($(this).children().length < 1) { // alert('hi');                    $(this).html($(this).text().replace("00%",'0%')) } });

Saturday, February 9, 2013

Repair Windows Server 2008 R2 & Restart issue

Repair WINDOWS Server 2008 R2

Suppose your windows Server R2 is not starting up & restarting at start up then you can fix it .

Procedure to Repair Corrupt Windows 2008 Server OS:

1)  Insert bootable CD / DVD of Windows 2008 Server in the machine.
2) Restart PC
3)  Instialize the New Windows setup.
4) Click on Repair Windows
5)Execute this command in recovery console
X:\Sources\Recovery\StartRep.exe

It will ake some time & fix all errors.

Friday, December 7, 2012

Reading Text file in Jquery Ajax

First create a dummy text file in your project  named as  text.txt , Now write some text content in that file.
You can read that file through JQuery Ajax request.
Alert will show the text content of written file.

 Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script>
getTxt = function (){
$.ajax({
url:'test.txt',            // Text file name
success: function (data){
   alert(data);    // or do some other data processing
}
});
}
$(function () {
 getTxt();  // calling ajax function on page load
 });
</script>


======================Update on getting AJAX reponse

AJAX is asyn it doesnt wait for send response.

function getddlData() {
    var ajaxResponse;
    $.ajax({
        type: "POST",
        url: 'TextEditor.aspx/GetBookMarkData',
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        async: false,
        cache: false,
        // Text file name
        success: function (response) {
            //    //alert(data.d);    // or do some other data processing
            //   //return data.d;
            ajaxResponse = response;
        }
    });
    return ajaxResponse;

Now you can use it like :

 var response = getddlData();
        alert(response.d); 

Saturday, December 1, 2012

Foreach in a GridView through JQuery

GridView Loop in  JQuery  To find a control


How to disable  a button in grid view in asp.net 

first add reference to JQuery

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>  





 <script>
$(function () {
  $('.jqSelector').each(function () {
$(this).attr("disabled", true);
  });
 })
 </script>


Note : jqSelector is a CSS class given to a button control inside the grid view


Use ASP Cookie in aspx

<%if HttpContext.Current.Request.Cookies("authuserid").Value<>"1"  AND HttpContext.Current.Request.Cookies("authuserid").Value<>"24" then%>



'''' User code here
<%End if%>

Saturday, October 13, 2012

Cross browser : Change scroll bar color & Custom scrollbar

Add the following CSS snippet in the header section of webpage.
 


 <STYLE>/* Let's get this party started */
::-webkit-scrollbar {    width12px;}
 /* Track */::-webkit-scrollbar-track 
{    -webkit-box-shadowinset 6px rgba(0,0,0,0.3);
     -webkit-border-radius10px;    border-radius10px;
}
 /* Handle */
::-webkit-scrollbar-thumb
 {    -webkit-border-radius10px; 
  border-radius10px;    backgroundrgba(255,0,0,0.8)

  -webkit-box-shadowinset 6px rgba(0,0,0,0.5)}
::-webkit-scrollbar-thumb:window-inactive 
{  backgroundrgba(255,0,0,0.4)}    
  </STYLE>