Sri Lanka .NET 
                Forum Member

Tuesday, November 27, 2007

MP3 Players

Are you planning to buy a mp3 player and do you want to compare prices of different players provided by different companies. There is a very nice and good site which is called “save buckets” which you can use to do buy a mp3 player for your need. From this site you can compare latest prices of hundreds of mp3 players.

Tuesday, November 20, 2007

Acedamic Second Shot

Microsoft is providing a second shot offer for acedamic students. To get register for that offer please visit below link.

Register

Wednesday, November 14, 2007

Tuesday, November 13, 2007

Sending Newsletters using C# 2.0

1.Without using MSMQ

using System.Net.Mail;
using System.Data.SqlClient;
using System.Messaging;



2.With using MSMQ

//This function will send the message to the msmq if the server
//fails to send the email
private void sendNewsletterMSMQ()
{
if (MessageQueue.Exists(@".\private$\Newsletter") == false)
{
MessageQueue.Create(@".\private$\Newsletter");
}

MessageQueue objQue = new MessageQueue(@".\private$\Newsletter");

SqlConnection conn = new SqlConnection("server=localhost;uid=sa;pwd=password;database=Newsletters;");
SqlCommand comm = new SqlCommand("SELECT DISTINCT Email FROM NewsletterEmails", conn);

SqlDataReader dr;

MailAddress from;
MailAddress to;

SmtpClient objClient = new SmtpClient();

objClient.Host = "host";
objClient.Credentials = new System.Net.NetworkCredential("user name", "password");

try
{

conn.Open();

dr = comm.ExecuteReader(CommandBehavior.CloseConnection);

while (dr.Read())
{
from = new MailAddress("admin@admin.com");
to = new MailAddress(dr[0].ToString());

MailMessage objMail = new MailMessage(from, to);

objMail.Subject = "Newsletter";
objMail.IsBodyHtml = true;
objMail.Body = "HTML CODE";

try
{
objClient.Send(objMail);
}
catch
{
objQue.Send(objMail.To[0].Address.ToString());
}
}

dr.Close();
}
catch (SqlException sqlEx)
{
Response.Write("Database error: " + sqlEx.Message);
}
catch (Exception ex)
{
Response.Write("General error: " + ex.Message);
}
}


//This function will start reading the msmq
private void readMSMQ()
{
MessageQueue objQue = new MessageQueue(@".\private$\Newsletter");

string[] types = { "System.String" };
((XmlMessageFormatter)objQue.Formatter).TargetTypeNames = types;

objQue.ReceiveCompleted += new ReceiveCompletedEventHandler(queue_ReceiveCompleted);

objQue.BeginReceive();
}


//Event handler for the ReceiveCompleted event
private void queue_ReceiveCompleted(object sender, ReceiveCompletedEventArgs e)
{
try
{
string toAddress = e.Message.Body.ToString();

sendNewsletterMSMQ(toAddress);

AyuviQue.BeginReceive();

}
catch
{

}

}


//This function will send the email to the specified address
private void sendNewsletterMSMQ(string toAddress)
{
if (MessageQueue.Exists(@".\private$\Newsletter") == false)
{
MessageQueue.Create(@".\private$\Newsletter");
}

MessageQueue objQue = new MessageQueue(@".\private$\Newsletter");

MailAddress from;
MailAddress to;

SmtpClient objClient = new SmtpClient();

objClient.Host = "host";
objClient.Credentials = new System.Net.NetworkCredential("user name", "password");

try
{
from = new MailAddress("admin@admin.com");
to = new MailAddress(toAddress);

MailMessage objMail = new MailMessage(from, to);

objMail.Subject = "Newsletter";
objMail.IsBodyHtml = true;
objMail.Body = "HTML CODE";

try
{
objClient.Send(objMail);
}
catch
{
objQue.Send(objMail.To[0].Address.ToString());
}
}
catch (Exception ex)
{
Response.Write("General error: " + ex.Message);
}
}

Monday, November 12, 2007

American Green Card

U.S Department of States have opened the 2009 Diversity Visa Program (DV-2009) now. The people who wish you apply for this lottery can now submit their applications.

The application submission period for DV-2008 is from 12:00PM EDT (GMT -4) on October 3, 2007 to 12:00PM EST (GMT -5) on December 2, 2007.

If you are intrested apply now.It's totally free.

Apply

Wednesday, October 17, 2007

Developer Day 2007

Yesterday I attended dev day 2007. It was an greate event from which we learn lot of technical things such as VS 2008 features,C# 3.0, LINQ and Silverlight.

The feature that I was intrested was about the ability of VS 2008 to debug java script like normal .net language. It also provides IntelliSense feature for java script as well.

So finally I must thank Wela(MDE) for orgernizing such an event and hope that there will be more events such as dev day in near future.

Thursday, October 04, 2007

Tiny URL

Do you want to get a tiny URL from a big URL and use that tiny URL instead of the big URL. I found out a site which provide that functionality.

Visit http://tinyurl.com/ for more information.

Tuesday, September 18, 2007

Second Shot at Microsoft Certification

Microsoft is providing an extra chance to pass any Microsoft IT Professional, Developer, or Microsoft Dynamics certification exam--free. In order to get this you must register.

Register

Wednesday, September 05, 2007

DevDay

Dev Day is going to happen on 16th October 2007 at Mount Lavinia Hotel. For more information and to get register please visit below link.

Register

Friday, August 31, 2007

National IT-BPO Capacity Summit 2007 - Career Fair

This career fair is going to happen between 1st-2nd September at BMICH.

The career guidance fair is open to parents, career counselors from schools, O/L and A/L students and also existing middle management professionals, who might be interested in entering the growing IT-BPO industry. All other stakeholders in the industry such as potential employers, educational and training institutions will also be present.

For more information please visit www.nics.lk

Friday, August 17, 2007

Friday, August 10, 2007

Outlook mails to your mobile

There is a free software which you can use to receive your emails and Outlook data to your mobile phone.

With that software

1.Receive your emails and Outlook data anywhere, anytime
2.Handle your schedule and meetings via your mobile device
3.Enjoy synchronized Personal Information Management (PIM)
4.Access information about your Contacts, anywhere, anytime

Download free software

Monday, August 06, 2007

Develop php applications using Visual Studio IDE

There is a php integrated development environment based on Visual Studio. With VS.Php you can design, develop, debug and deploy Php applications within the Visual Studio IDE.

Download

Wednesday, August 01, 2007

.NET User Group Meeting August 2007

VSTO development using VS.NET 2008

By: Prasanna Amirtalingam (MVP - Visual Basic)
http://www.prasanna.ws

By now you heard the Visual Studio 2008 Beta2 is released.
So join us to take a look at some of the new designers available in Visual Studio.NET 2008
which simplifies programming for office. This session would also show how easy it is
to extend the Microsoft Office platform in embedding custom business logic.

Date: 1st August 2007
Time: 6.00 PM onwards
Venue: Microsoft Sri Lanka Training Room, 11th Floor, DHPL Building, Nawam Mawatha, Colombo 02
Entrance: Free (as usual)

Tuesday, July 17, 2007

Office File Conversion

Now youcan convert your old (non office 2007) documents into office 2007 documents. Visit below link and download the software.

Download