var obj = JSON.parse(Jsonresult);
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
var value = obj[key];
alert(value.CustomerID);
}
}
document.getElementById('result').innerHTML = html;
As per the requirement from one of my client, an image should be generated dynamically by taking the necessary information from the user. When I went on a search, I came to know that, my crazy DotNet framework provided my two namespaces System.Drawing and System.Drawing.Imaging. It’s enough to learn three classes from these namespaces - Bitmap and Graphics for generating an image dynamically related to System.Drawing Namespace and FileFormat class is for saving the created image in different file formats and is related to System.Drawing.Imaging Namespace. Bitmap class is useful to generate a new image and to save it different file formats. Graphics class is useful to design the image using lines, curves, rectangles, text etc., with colors and everything. FileFormat class is useful to save the file in a particular or in different formats like Jpeg, Png, Bmp etc. The default format is png. Now lets jump into code. After
INTRODUCTION :- One of my clients required a desk top application that maintains contacts in a database and sends emails to the contacts in the database. They have not provided the credentials and the details of mail server. So I created an application that uses outlook for sending mails by using the credentials preconfigured by the outlook account. This application can send email for multiple email accounts and with or without attachments. FEATURES :- · Sending mails to multiple email accounts at a time. · Using configured outlook credentials. · No need of configuring credentials every time. · Sending mails with attachments. CODE EXPLANATION :- Create new project and add references as follows. These files can be downloaded or can be achieved by the sample project which is attached with this article. Interop.Microsoft.Office.Core.dll Interop.Outlook.dll Let’s go to code part. Import the fo
First step is selecting the file paths and then read the file using Stream Reader and save the content to the string builder. After doing this for all the files, now our content is in the string builder. Now create a file with the file stream (using file stream is easily can easily kill the process). Now write the content of the string builder to the newly created file using the Stream Writer. I have done this in winforms. You can download the demo here. Our UI looks like this. UI consists of two buttons, one( btnBrowse) for browsing or selecting the text files and another( btnSaveResult) for saving the new file with the combined content. One textbox for viewing the combined content. Apart from these controls we have added one OpenFileDialog control and one SaveFileDialog control for selecting the files and saving the newly created file respectively. Now lets jump into the code. Using System; using System.Collections.Generic; using Sys
Comments
Post a Comment