Email sending problem from Godaddy server solved in ASP.NET (108 situations)


Hello  everybody. When I am trying to send an email with HTML format the values are coming from database i felt problem with godaddy server.

నేను ఒకసారి GoDaddy ద్వారా ఈమెయిలు పంపిస్తుంటే చాలా ప్రొబ్లెంస్ వచ్చాయి
నేను వాటిని పరిశోధించి చివరికి చిన్న సమాధానం కనుకునా ఏమైనా సందేహం వుంటే మెయిల్ చెయ్యండి


To solve that we must add relay hosting.

I’d just like to add that when you’re sending email via “” you will be able to send email via the GoDaddy server but it will not work if you run it locally. This is normal – it’s a security feature.

Code below

using namespace.

const string SERVER = “”;

System.Net.Mail.MailMessage objMail = new System.Net.Mail.MailMessage();

objMail.From = new MailAddress(“”);objMail.To.Add(MailId);


objMail.IsBodyHtml = true;

objMail.Subject = “Order Confirmation”;

objMail.Priority = System.Net.Mail.MailPriority.High;

objMail.Body = “<h1>hi</h1>”;

SmtpClient Client = new SmtpClient(SERVER);Client.Send(objMail);


This is working with my Godaddy Server try out


Gmail down

Leave a comment

Hi friends My gmail account is not opening from yesterday night i.e 6th Aug 08 and also not opening today.

ఫైరుఫాక్సు లో జిమెయిల్ రావటం లేదు కాని అదే ఇంటర్నెట్ ఎక్సప్లోరర్ లో వస్తుంది

I dont know what happened exactly so I have send a mail to gmail team they send the following reply:


Thank you for your report.

We are aware of this problem, and our engineers are making progress to
restore account access. You can find timely updates in the Gmail Help
Discussion group at:
We apologize for any inconvenience this has caused.


The Google Team

I dont know what happened this is drawback of google.

I have read many blogs and I found that same account is opening in IE.

I tried opening in IE it is working fine.

I dont know what happened with IE only its working.

I must switch to some other alternative to gmail.

How to know the width & height of an uploaded image in ASP.NET

Leave a comment

How to know the width & height of an uploaded image in ASP.NET

ఇమేజ్ యొక్క పొడవు వెడల్పు in ASP.NET

Import the namespace using System.IO;
Step 1:
using System.IO;

Step 2:
System.Drawing.Image UploadedImage = System.Drawing.Image.FromStream(Image1.PostedFile.InputStream);
Here Image1 is the name of uploaded image.

Creates an Image from the specified data stream.
To know more visit:

Step 3:
Now you can get width and height of image using


Random number generation in ASP.NET

1 Comment

Random number generation in ASP.NET

ఏదో ఒక్క నెంబర్ జనరేషన్ in ASP.NET

Step 1:

write a class file.

Create a cs file named as rand.cs

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.VisualBasic;

/// <summary>
/// Summary description for random_number
/// </summary>
public class random_number
public string GetRandomNumber(int length, string characterSet)

string randomData = “”;

int position = 0;

byte[] data = new byte[length];

int characterSetLength = characterSet.Length;

System.Security.Cryptography.RandomNumberGenerator random = System.Security.Cryptography.RandomNumberGenerator.Create();


for (int index = 0; (index < length); index++)

position = data[index];

position = (position % characterSetLength);

randomData = (randomData + characterSet.Substring(position, 1));


return randomData;



step 2:

use this in codebehind of any aspx page

random_number r1 = new random_number();
string str= r1.GetRandomNumber(5, “ABCDEFGHIJLLMNOPQRSTUVWXYZ_1234567890”);

ASP.NET Tutorials

Leave a comment

ASP.NET లో బేసిక్స్ కావాలంటే చూడండి

చాలా బాగా అర్ధమయ్యిది.

Gridview operations Edit,Delete,Update


గ్రిడ్ వ్యూ లో కొన్ని  ఆపరేషన్లు

BoundField in Grid view and bind the data to each field using “Edit Column” option in smarttag of grid view.

We can also add images to Edit and Delete option in Grid view “edit columns” by adding a “commandfield”.

String con1 = ConfigurationManager.ConnectionStrings[“con”].ToString();

DataSet ds = new DataSet();

protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)


GridView1.EditIndex = -1;



protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)


string i = GridView1.DataKeys[e.RowIndex].Value.ToString();

int j = Convert.ToInt32(i);

TextBox t1 = new TextBox();

t1 = (TextBox)GridView1.Rows[e.RowIndex].Cells [0].Controls [0];

TextBox t2 = new TextBox();

t2 = (TextBox)GridView1.Rows[e.RowIndex].Cells [1].Controls [0];

TextBox t3 = new TextBox();

t3 = (TextBox)GridView1.Rows[e.RowIndex].Cells [2].Controls [0];

SqlConnection con = new SqlConnection(con1);

string upt = “update Allergies set Allergy = @allergy, Symptoms = @symptom, Action_to_be_taken =@action where Allergy_id=” + j;

SqlCommand cmd = new SqlCommand(upt, con);

cmd.Parameters.Add(“@allergy”, SqlDbType.VarChar).Value = t1.Text;

cmd.Parameters.Add(“@symptom”, SqlDbType.VarChar).Value = t2.Text;

cmd.Parameters.Add(“@action”, SqlDbType.VarChar).Value = t3.Text;




GridView1.EditIndex = -1;



protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)


GridView1.EditIndex = e.NewEditIndex;



protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)


string i = GridView1.DataKeys[e.RowIndex].Value.ToString();

int j = Convert.ToInt32(i);

SqlConnection con = new SqlConnection(con1);

string del = “Delete from Allergies where Allergy_id=” + j;

SqlCommand cmd = new SqlCommand(del, con);




GridView1.EditIndex = -1;



Automatically refresh a page after a popup window has been closed in ASP.NET

Leave a comment

ఫొప్ అప్ బాక్స్ ముసివెసినా తర్వతా పరెంట్ పెజ్ రిఫ్రెష్ అవుతుంది

in popup.aspx write down the following line


this will close popup after clicking save button of popup and refresh the parent form.

భరత్ రాధే కృష్ణ

Older Entries

%d bloggers like this: