Weblog Of Nirandas | home

Developer From INDIA

Expand short URLs of tinyurl, bit.ly, tr.im etc

clock June 29, 2009 05:47 by author Nirandas

Popularity of services like twitter and other social networking sites have resulted in an exponential growth in the number of URL shortening services. bit.ly, tr.im are just few of the example. Though these URL shortening services solve a major issue of long URLs and save space where it is required, these services have a major downside to it.
More...

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Creating global hotkeys using managed Win API

clock June 17, 2009 00:54 by author Nirandas

.NET framework does not by default provide classes/methods for creating global hotkeys in our .NET applications. A hotkey can be defined as a particular key combination pressing of which triggers a event in our application even if user is not actively working on our app. For achieving this, we’ll have to call into win32 api functions. Though .NET framework makes this work relatively easy, still calling into managed dlls and wrapping them in .NET classes and constants is not a trivial task. To avoid all this, we can use an open source, LGPL licensed sourceforge project Managed Win API
More...

Currently rated 3.6 by 5 people

  • Currently 3.6/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Quick FTP file upload in .NET

clock June 5, 2009 01:15 by author Nirandas

Uploading files using FTP is quick and easy in .NET framework. Below is a simplest possible method to upload a local file to a FTP server. Example is in VB.NET, converting it to C# should not be a problem.

Dim w As New System.Net.WebClient
w.Credentials = New System.Net.NetworkCredential(var_user, var_pwd)
w.UploadFile(var_url, var_localfile)

Here var_user and var_pwd refers to FTP username and password. The var_localfile variable holds the full path to the file to upload. The var_url variable should contain the URL where to upload the file, including the filename on the server. For example, “ftp://www.example.com/uploads/test.txt”.

The System.Net.WebClient class contains many other easy to use methods for uploading/downloading data.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Who Am I?

I am Nirandas - a developer from INDIA

Sign in