Revision #5
Sun, Aug 23, 2009 2:59 PM
by mbanavige
|
FtpWebRequest
FtpWebRequest The FtpWebRequest class enables you to programatically create FTP connections to FTP Servers and transfer files. If you are interested in using the FtpWebRequest class to upload files to a server,here is a code sample: FtpWebRequest ftpRequest;
|
Revision #8
Sat, Apr 10, 2010 7:41 AM
by chintanpshah
|
HttpWebRequest
HttpWebRequest The HttpWebRequest class allows you to programatically make web requests against an HTTP server. This code shows how toread a file's content from a remote webserver using the HttpWebRequest class. Visual Basic: If Not (IsPostBack) Then Try
|
Revision #2
Sun, Aug 23, 2009 3:07 PM
by mbanavige
|
Http Handlers to handle Images
Hi,In this article i am going to create an http Handler which is used to resize my images and display it .What are HTTP Handlers?HTTP handlers are the .NET components that implement the System.Web.IHttpHandler interface, they can act as a target for the incoming
|
Revision #2
Sun, Aug 23, 2009 3:54 PM
by mbanavige
|
Logging Errors and Exceptions in ASP.NET 2.0
In this article i am going to use simple class which use to write error and exceptions occured in your asp.net application in a text file format. Below i have created a class Common in which there is function WriteToEventLog which accepts Exception as parameter
|
Revision #3
Tue, Sep 20, 2011 9:12 PM
by aminjun
|
Reflection
Reflection is the ability of the .NET framework to gather information (metadata) about assemblies, modules and types at runtime. It allows you also to dynamically create instances of types, invoke methods and access fields, properties and attributes. System
|
Revision #2
Sun, Sep 13, 2009 10:16 AM
by mbanavige
|
Custom HTTP Module
Before starting have a look in the Web.config in the locationC:\Windows\Microsoft.NET\Framework\versionnumber\CONFIG\Web.configYou can see the existing HTTPModules in the frameworksystem.web> httpModules> add name="OutputCache" type="System
|
Revision #3
Fri, Oct 21, 2011 7:44 PM
by mezzanine74
|
Send email with smtp authentication using ASP.NET 3.5
Following Codes demonstrates how to send an email with SMTP Authentication using ASP.NET 3.5 using System.Net.Mail MailMessage msgMail = new MailMessage(); MailMessage myMessage = new MailMessage(); myMessage.From = new MailAddress("sender's email"
|
New
Tue, Mar 9, 2010 6:30 AM
by cnranasinghe
|
Saving and Calling a image from SQL Server DB
DAL Should like following when inserting a image. I used the Enterprise Library to data access. Data type of EmployerImage is image @ SQL Server table.Public Sub Insert() Try Dim DB As Database = DatabaseFactory.CreateDatabase(CWB_DBCONNECTION_STRING) Dim
|
New
Tue, Mar 9, 2010 6:31 AM
by cnranasinghe
|
Creating a Full Text Service and Searching items from Code behind
Open SQL Server and open a database (Already created) . On the Storage section find the Full Text Catalog. Right click and create a New Catalog.Create SP like this CREATE PROCEDURE [dbo].[spSelectBusinessInfoByKeyword] @Keyword nvarchar (50)ASSELECT BusinessInfoID
|
Revision #2
Thu, Mar 11, 2010 7:20 PM
by cnranasinghe
|
What is Boxing and Unboxing in C#?
Boxing means converting Value type to a Reference type.Ex : int i=100;object obj=(object) i;Unboxing means converting Reference type to a Value type.Ex: object obj=100;int i=(int)obj;
|
Revision #3
Wed, Jun 16, 2010 8:13 AM
by uniquesaiful
|
Tiered Architecture
3 - Tier Architecture is like following : 1.Presentation Layer 2. Business Logic Layer /Data Manager Layer 3. Data Access Layer The communication between all these layers need to be done using Business Entities. 1. Presentation Layer is the one where the UI
|
Revision #5
Tue, Apr 27, 2010 9:13 PM
by cnranasinghe
|
Common SELECT Statements (SQL Server)
Followings are some examples of using SELECT statement. My table name tblTest. Followings are columns. (TestID, TestName, TestDate, TestCity )1) Select * from tblTest (Returns all columns/Rows)2) Select * from tblTest Where TestID=2 (Returns the row/s which
|
New
Thu, Mar 18, 2010 7:33 AM
by nimish_soft
|
Sending Asynchronous Mail
public void SendAsyncMail(){ MailMessage mail = new MailMessage(); mail.From = new MailAddress("Enter from mail address"); mail.To.Add(new MailAddress("Enter to address #1")); mail.To.Add(new MailAddress("Enter to address #2"
|
Revision #4
Tue, Apr 27, 2010 9:13 PM
by cnranasinghe
|
Sky View : Default Assemblies in .NET Framework
System; System.CodeDom.Compiler; System.Collections; System.Collections.Generic; System.Collections.ObjectModel; System.Collections.Specialized; System.ComponentModel.Design; System.ComponentModel.Design.Serialization; System.Configuration; System.Configuration
|
New
Sat, Mar 27, 2010 12:59 PM
by nimish_soft
|
Generate a Random Password
This is simple and effective method for generation of a random password Public Function GeneratePassword(ByVal PwdLength As Integer) As String Dim _allowedChars As String = "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789" Dim rndNum
|
New
Tue, Mar 30, 2010 7:07 PM
by nimish_soft
|
Read System Registry Values
Here is the example code:Imports Microsoft.Win32 dim MyValue as string MyValue = RegValue(RegistryHive.LocalMachine, "SOFTWARE\Microsoft\Internet Explorer", "Version") Public Function RegValue(ByVal Hive As RegistryHive, ByVal Key As String
|
New
Sat, Oct 30, 2010 1:49 PM
by miya2008
|
Upload an Image and an Audio file using C#
In my case, I use a FileUpload Control(Id:->FileUpload1), an ImageButton(ImageButton1) or you can use the Image, a Button Control(Id:->Updatebttn) to upload my Image, Button Control(Id:->Addbttn) to add my Image in database, an image(which I want
|
Revision #2
Sun, Jan 23, 2011 3:21 PM
by codenickel
|
Read CSV file using C#
I'm going to expalin how extract data from csv file using c#.First you have to declare two string variables and their properies for store directory and filename of csv file which you want to extract data.private string dirCSV;private string fileNevCSV;public
|
New
Sun, May 15, 2011 5:39 PM
by durga89
|
Understanding Request and Response ...
We need a basic knowledge about what is Request & Response objects. The following information may be helpful to all. How beautifully these are handling things occurring in a Page class. Request and Response are the properties of the Page class. The Request
|
Revision #2
Tue, Aug 9, 2011 5:32 AM
by horizon_net
|
Working with NoSQL Databases
Working with NoSQL Databases How to get started with NoSQL? Since 2009 NoSQL databases becomes more and more popular. But why? No usage of SQL, that means Less complexity Better portability Boundlessness User-friendliness Most databases areOpen-Source Performance
|
Revision #2
Thu, Sep 8, 2011 10:21 AM
by codenickel
|
How to integrate paypal?
Papal Integration · Create PayPal sandbox account (https://developer.paypal.com) · Chose Test accounts To test a merchant transaction, you must use a test Business Account. To test a buyer transaction, you must use a test Personal Account. · To simulate a
|
Revision #2
Thu, Sep 8, 2011 10:21 AM
by codenickel
|
Dynamic XML
One of the newcomer in C# 4.0 - great newcomer is new keyword 'dynamic'. Dynamic variables are run-time binded which is very helpful many times e.g. it simplify access to COM objects. I don't want to explain in more details about 'dynamic'
|
Revision #2
Sun, Oct 23, 2011 2:51 PM
by codenickel
|
DLR : Expressions and a ‘Hello World’ application
DLR Expression is the backbone of the DLR. It is a separate feature that you can use without involving the rest of the DLR. Let’s take a look at what DLR Expression is first, before getting into the examples. DLR Expression is much like a programming language
|
Revision #2
Sun, Nov 27, 2011 10:38 PM
by codenickel
|
Image Recaptcha using generic handler
************************GENERIC HANDLER FOR CAPTCHA IMAGE GENERATION****************************** %@ WebHandler Language="C#" Class="CaptchaHandler" %> using System; using System.Web; using System.Drawing; using System.Drawing.Text;
|
Revision #2
Wed, Aug 22, 2012 2:44 PM
by tmorton
|
Using Resource Files with UserControls which Located in SubFolders
You need to create another App_LocalResources inside this sub folder, and put your user control resources files inside it . look at this structure for example to get the Idea : Your WebSite Root App_LocalResources YourPage.aspx.ar.resx YourPage.aspx.resx YourPage
|
Revision #2
Wed, Aug 22, 2012 2:41 PM
by tmorton
|
Encrypt & Decrypt ConnectionString Section
Encrypt & Decrypt ConnectionString Section Sometimes we need to secure ConnectionString to prevent anyone can knows it. whatever your purpose from securing ConnectionString, there is a way to Encrypt and Decrypt ConnectionString by special codes as we
|
Revision #2
Wed, Aug 22, 2012 2:44 PM
by tmorton
|
How to Send Mail with Error Message Details
How to Send Mail with Error Message Details Sometimes need to handle error and send it to technical support to handle error and send the solution to the clients. anyway we will use Global Application Calss Global.asax to write our code. as you will see void
|
Revision #2
Wed, Aug 22, 2012 2:43 PM
by tmorton
|
How to Get MacAddress and Get All Adapter Types in ASP.NET
How to Get MacAddress and Get All Adapter Types in ASP.NET In this demo we will see how to get MacAddress in ASP.NET in easy steps. In the first step we will write important part of code, we will add our code in Utility class, In the last step we will call
|
Revision #2
Wed, Aug 22, 2012 2:41 PM
by tmorton
|
Get the current logged in user id (MVC3)
hi every one! i will show a way that you will get the current logged in user id. it can be done by generating a GUID from theProviderUserKey of the current logged in user like this Guid cur_user_id = (Guid)Membership.GetUser().ProviderUserKey; that's it
|
Revision #2
Sat, Nov 24, 2012 12:15 PM
by codeNickel
|
Developer Guidelines
Things to be taken care by developers while writing code or designing different layers Presentation Layer: Choose your UI elements carefully Optimize Viewstate State management should be effective and optimized well Well Managed Caching Reduce round trips
|
Revision #2
Thu, Dec 27, 2012 6:49 PM
by codeNickel
|
zebra barcode printing using asp.net
zebra barcode printing using asp.net It is really difficultto find something on internetto print zebra code from asp.net form Yes what you will find is javascript to acheive the same. Also its easy to do from windows application. Issue : when you use javascript
|
Revision #2
Thu, Dec 27, 2012 6:49 PM
by codeNickel
|
Iterating through a Dictionary Object's Items in VB.NET and C#
Iterating through a Dictionary object may seem complicated in principle but in practice it is farily straightforward, and this involves looping through each of the KeyValuePair objects in each Dictionary item: - VB.NET Dim DictObj As New Dictionary(Of Integer
|
New
Mon, Mar 21, 2011 7:34 PM
by suhasharidas
|
create LINQ to database in the .NET Compact Framework 3.5
Let see an example of using the database in LINQ and C#.netcf We will using classCustomer Here's some sample data: using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Collections;
|