Skip to main content

Posts

Showing posts with the label Advance Programming

Nested update panels with file upload and download in asp(.)net c#

This comes as basic requirements by the majority of clients that they want a good user experience with some file uploaders/downloads for templates which are further used in your application. Just in case,  you are not using any new technologies, no spa, no JSON and no angularjs etc. Your app is made of asp.net because of security concerns of your firm and not so knowledgeable managers and the page refreshes every time the second you click a button and reload the entire content, but you do not want that as you know UX design ethics, so to overcome this problem you added an update panel and a nested update panel outside button to make it asynchronous, but what is this? You are not able to make button click event to get hit in code behind c#. What will you do? You will use update panel triggers like below. <asp:UpdatePanel ID= "UpdatePanel1" runat= "server" > <ContentTemplate> <fieldset style= "width:...

Unit Testing, In a right way.

This blog is aimed at those developer who have little development and unit testing experience. Please refrain yourself to proceed if you don't know development. What is Unit Testing ? By Definition, In computer programming, unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application. In procedural programming a unit may be an individual function or procedure. Unit tests are created by programmers or occasionally by white box testers. Some Benefits of Unit Testing: Bug Tracking Code Maintenance Understandable code How the above things help in actual scenario ? Suppose you have developed a code from scratch and it went to maintenance. Now you left the company, there are no unit test written and a bug came via customer. The app went for a hot fix and some other guy fix it, and  his fix created another which in turn creates another issue. So the creation of i...

Refresh the Jquery Css for a HTML control using knockout in Javascript.

If you are a JavaScript developer then you might have come across a situation where you load your HTML controls after the page load has happen, which is like dynamic binding of controls. And then you see your input type text doesn't have the proper Css as other inputs. You also load select (dropdown)  that also doesn't have the proper css. You are in chrome and press F-12 to inspect the element, y ou see that nothing is there in control, it is not applying the JQuery css. But the controls that are loaded in page load have it. What to do, no options just to manually copy the CSS classes. VERY BAD IDEA? Just do this, In HTML < input type ="date" data-bind ="i nputsRefresh: $element, value: $data.EndDate " /> and in JS binding handler

JavaScript is too cool and so is the inheritance.

I can say million words about Javascript, it is so cool. We will start with the   inheritance  in the JAVASCRIPT which will make our concepts a little shaky as it implements prototypical inheritance which are not bad the point is we are not used to code in JS. As almost everyone in this world are from JAVA or .NET background. Inheritance is an important topic in most programming languages. In the classical languages (such as Java), inheritance (or extends) provides two useful  services. First, it is a form of code reuse. If a new class is mostly similar to an existing  class, youonly have to specify the differences. Patterns of code reuse are extremely  important because they have the potential to significantly reduce the cost of software  development. The other benefit of classical inheritance is that it includes the  specification of a system of types.  This mostly frees the programmer from having to  write exp...

Send a Fax in windows using faxcomexlib and TAPI in VB code .Net

An application that provides sending fax from faxmodem, connected to the computer, will be explained in the following post.  We can use Telephony Application Programming Interface (TAPI) and the Fax Service Extended Component Object Model (COM) API to send fax. The fax service is a Telephony Application Programming Interface (TAPI)-compliant system service that allows users on a network to send and receive faxes from their desktop applications. The service is available on computers that are running Windows 2000 and later. The fax service provides the following features: Transmitting faxes Receiving faxes Flexible routing of inbound faxes Outbound routing Outgoing fax priorities Archiving sent and received faxes Server and device configuration management Client use of server devices for sending and receiving faxes Event logging Activity logging Delivery receipts Security permissions The following Microsoft Visual Basic code example sends a fax. Note that...