Wednesday, September 11, 2013

load log *.txt file in asp.net page using jquery

 

  $('
').load('mytextFile.txt', function (textStr) {
            var htmlStr = $(this).html(textStr).text();
            $(this).html(htmlStr);
        }).appendTo('form');



Tuesday, September 10, 2013

ask for saving new records once clicked on submit



    Untitled Page
   
   

   

   

       
       

       
           
           
           
           
       

       

       
   

   

protected void btnsubmit_Click(object sender, EventArgs e)
        {
            Response.Write("button_clicked");
            string str = "Are you sure, you want to Approve this Record?";
            this.ClientScript.RegisterStartupScript(typeof(Page), "Popup", "ConfirmApproval('" + str + "');", true);
        } 


       
       

       
           
           
           
           
       

       

       
   
 

  function ConfirmApproval(objMsg) {
            if (confirm(objMsg)) {
                $('.txtCheck').attr('disabled', 'disabled');
                $('.ddlCheck').attr('disabled', 'disabled');
                return true;
            }
            else {
                alert("redirected");
                return false;
            }
        } 

Monday, September 9, 2013

best comment in source code

// 
// Dear maintainer:
// 
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
// 
// total_hours_wasted_here = 42
// 


//When I wrote this, only God and I understood what I was doing
//Now, God only knows

http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered

Sunday, September 8, 2013

why make self as this reference in knockout.js

Import Data using INFILE in mysql

LOAD DATA local INFILE 'E://31october//SP//sp_files_sample1//400k sp00 6-19 E.csv'
INTO TABLE  tblspmaster
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(sp);

Export data using outfile in mysql

SELECT *
INTO OUTFILE 'E:\31october\SP\Export\10000000.csv'
FIELDS
  TERMINATED BY ','
  OPTIONALLY ENCLOSED BY '"'
  ESCAPED BY '\\'
  LINES TERMINATED BY '\n'
FROM tblspmaster
WHERE CSN BETWEEN 0 AND 10000000


ASP.NET Core

 Certainly! Here are 10 advanced .NET Core interview questions covering various topics: 1. **ASP.NET Core Middleware Pipeline**: Explain the...