Sri Lanka .NET 
                Forum Member

Friday, December 21, 2007

Free E-Books

Microsoft is providing free 3 ebooks for Visual Studio 2008.

Below are the topics.
1. LINQ
2. ASP.NET AJAX
3. SILVERLIGHT 1.0

Download

Wednesday, December 12, 2007

7 Ways to Work Faster on Slow Connections

I found a useful article in Microsoft web site which provides 7 ways to work faster on slow connections.

Read the article

Monday, December 03, 2007

Bomb Blast

Watch LTTE Human Bomb in Action !!!

View Video

Well Done

Congratulation to our Murali for becoming the world's leading wicket taker for test cricket. Hope that he will get 1000 test wickets and become the worlds leading wicket taker in one day matches as well.

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