Friday, December 21, 2007

Sending Emails with Dynamic Content

I want the message of the email to like
Hi , Thank you for sending this email. See you soon. Good Bye,

Code :
try

{
StreamReader sr=new StreamReader("MyContent.htm");
sr = File.OpenText("MyContent.htm");
string result = sr.ReadToEnd();
sr.Close();
}
catch(Exception ex)
{
Response.Write(ex.Message);
return;
}
string MessageBody=result.Replace("", txtFriendName.Text);
MessageBody=MessageBody.Replace("", txtMyName.Text);
MessageBody= MessageBody.Replace("",DateTime.Today.ToString());
MailMessage mail = new MailMessage();
mail.Body = MessageBody;
mail.BodyFormat = MailFormat.Html;
mail.From = "YOUR EMAIL ID";
mail.To = "YOUR FRIEND'S EMAIL ID";
mail.Subject = "Dynamic Content Email From "+ txtMyName.Text;
SmtpMail.SmtpServer = "your email server";
SmtpMail.Send(mail);

Message Box in Asp.Net

public void ShowMessageBox(string message)
{
Page currentPage = (Page)HttpContext.Current.Handler;
if (currentPage != null)
{
ScriptManager manager = ScriptManager.GetCurrent(currentPage);
string _msg = "alert('" + message + "');";
if (manager != null && manager.IsInAsyncPostBack)
{
ScriptManager.RegisterClientScriptBlock(currentPage, currentPage.GetType(), "msg", _msg, true);
}
else
{
currentPage.ClientScript.RegisterStartupScript(currentPage.GetType(), "msg", _msg, true);
}
}
}

Sunday, December 16, 2007

When I See You !!

Nothing explains,

The rush of blood

Pumping through my veins

I hope you know,

That I like You.

I hope you say

That you do too.

I knew that

Iwould like to be,

Protectedby someone like you.

How clear can I

Make it all now,

What can I say

Where why and how.

I cannot think

Words unspoken

The way i thought

My heart was broken.
Missing u a lot today…. dont […]





Why do men love women?


The feminine sex is one of the most refreshing things ever hit the humanity. I mean, come to think of it, at the root of every historical event, there is always a women involved. Even in fairytales, mythologies and legends, no fable is complete without the touch of the feminine.
Man is the residue of Woman. They are born in the blood, kicking and screaming, because they’ve been wrenched from the best place in existence. So much that Man has to spend the rest of his life in pursuit of the recreation of that consciousness. Right from a warm bed, to a cosy home, to a cushy job, to a luxury car to a… you name it.
A woman is the best concept God has ever sold to a Man. They always talk about the male getting in touch with his feminine side. How come they don’t say that about woman? Hehehe . They don’t need to discover the masculine side, as long as they have something masculine by their side. Women are like cats, you can never own them. But if you treat them like the royalty they are, then their kingdom is yours.
Men need women to fall in love with; women just don’t need a mirror. God created man before woman. But you always make a rough draft before the final masterpiece.
Women are great at communication, the best in fact. A woman can say more in a sigh than a man can in a speech. They get the last word in every argument. Anything a man says after that is the beginning of a new argument. Funny thing is , men can argue forever; only women can make them stop. All she needs to do is start crying.
A man needs a woman to make money, If women didn’t exist then all the money in the world would have no meaning. Think about it, a world without women.. no television, no chocolate, no breakfast, no channel No 5, no Bipasha Basu, no Brad Pitt.. no Madonna, and the ultimate horror – no Playboy !
A man spends his whole life trying to be a man, a woman spends hers trying not to be woman. She’s a mother, a wife, a daughter, a sister, a grandmother etc. A man will always try to be a man first. It is this conflict that is his mystery.
All art serves the feminine. There are very few female poets, that’s because most they become the poem. There are more paintings of women than there are of any other subject. That’s probably because it’s the only time a man can take his won sweet time with various women without the guilt.
Men love naked women. Men are supposed to love them! How’s that for getting in touch with your feminine side? Most “married” or “faithful” men love to look at pictures of naked women. That doesn’t mean they’re cheating, it’s just that they can’t get enough of the feminine.
A woman will not own just one pair of shoes, will she?
So will man ever “figure” out women? I don’t think so. We’re not supposed to. Man is like the Earth, he just needs to keep on spinning to keep things going. The woman is the Galaxy, she keeps the orbit right, the seasons changing, the weather favorable and the sun always shining.