|
|
First you have to make sure the SMTP service installed on your PC?
And you might post your code here...
<< >>
|
|
|
|
|
SMTP Service is running.
<br />
ailMessage msg = new MailMessage("sample@lookman","kapat_saltcode@yahoo.com");<br />
msg.Body = "Did u receive this, if u did don't reply, just testing";<br />
msg.Subject = "TESTING";<br />
try<br />
{<br />
SmtpClient sc = new SmtpClient("lookman");<br />
sc.Send(msg);<br />
}<br />
catch (SmtpException smtpex)<br />
{<br />
Label1.Text = smtpex.Message.ToString();<br />
}<br />
catch (Exception ex)<br />
{<br />
Label1.Text = ex.Message.ToString();<br />
}<br />
|
|
|
|
|
MailMessage mail = new MailMessage();
mail.From = new MailAddress("me@mycompany.com");
mail.To.Add("you@yourcompany.com");
mail.Subject = "This is an email";
mail.Body = "this is a sample body with html in it. This is bold <font color=#336699>This is blue</font>";
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient("127.0.0.1");
smtp.Send(mail);
That is from the link I provided. Does that shed any light on the subject?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
|
how we can validate the TextBox with length not less than 3 digit and not more than 15 digite.
witch validation control is best.
|
|
|
|
|
<script Language="JavaScript">
function Length_TextField_Validator()
{
if ((form_name.text_name.value.length < 3) || (form_name.text_name.value.length > 15))
{
mesg = "You have entered " + form_name.text_name.value.length + " character(s)\n"
mesg = mesg + "Valid entries are between 3 and 15 characters.\n"
mesg = mesg + "Please verify your input and submit again."
alert(mesg);
form_name.text_name.focus();
return (false);
}
return (true);
}
</script>
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my answer is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Set the MaxLength for the textbox to 15 and then set a Regular Expression validator and find an expression along the lines of $(/d(3))^ or something.
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
|
jayvaishnav82 wrote: length not less than 3 digit and not more than 15 digit
So, range from 100 to 999999999999999? RangeValidator maybe...
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Help!
I have two Textboxes that I extended with the AJAX Calendar Extender. Now I need to use those textboxes as parameters to a SQL Query.
My Code looks like this at the moment:
da_Top25Devices.SelectCommand.Parameters.Add(new SqlParameter("@DateFrom", SqlDbType.DateTime, 8));
da_Top25Devices.SelectCommand.Parameters["@DateFrom"].Value = Convert.ToDateTime(txtDateFrom);
da_Top25Devices.SelectCommand.Parameters.Add(new SqlParameter("@DateTo", SqlDbType.DateTime, 8));
da_Top25Devices.SelectCommand.Parameters["@DateTo"].Value = Convert.ToDateTime(txtDateTo);
I get the following error when I run in debug mode:
System.InvalidCastException: Unable to cast object of type 'System.Web.UI.WebControls.TextBox' to type 'System.IConvertible'.
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
It's because you can't convert a Textbox into a DateTime object - try using txtDateFrom.Text
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
If I change it to txtDateFrom.Text; I get this error.
Failed to convert parameter value from a ListItem to a String.
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
Do your extended textboxes have a valid .Text property or is there some other way you need to access the value in the box?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy) "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
i need to change the page layout of the web page in asp.net 2005 how to do?
|
|
|
|
|
Change how?
You could use positioned divs, css or a variety of methods depending on what you're trying to acieve
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Dear friends
I have one web based application. I have four buttons like Add,Delete, Edit etc. I need short cut keys to be attached for the execution of all buttons. like for Add I can use Alt+A
Also I have one combo box control whose items are very big string but since my width of combo box is very small I am not able to read the complete items value. How can I use the tool tip to show the user complete item string of a selected item from combo box.
Your quick response will be highly appreciated.
Regards and Thanks
Murtuza Patel
|
|
|
|
|
|
How to use shortcut keys in web development like we r using in desktop applications for differeent types of action such as Help -F1.
trrtuu
|
|
|
|
|
You can assign access keys to hyperlinks. For example:
<a href="myhelpfile.htm" accesskey="H">Help</a>
|
|
|
|
|
F1 can be handled from document.onHelp
|
|
|
|
|
Hi Everybody
I want solution for my problem.
I have two Frames in a html page. In first Frame i place a javascript menu(File-New,Open .. like this ) Menus and submenus. In the Second Frame is the Empty Page. I click the Menu then the submenus are hidden that is it goes inside the first frame . The submenus are not visible . Any Option is there for it
RK
|
|
|
|
|
Check for parameters wich u r passing in javascript...
Regards,
Smart Boy
Mumbai,
(INDIA)
|
|
|
|
|
Hi all,
I'm developing a web application where the application opens in a full screen mode. The users need a Show Desktop icon on it, clicking which the user's desktop comes up, just like the Windows Show Desktop icon.
Is this possible? If yes then please help me, its really important for my client!!,
thanks in advance,
Robin
|
|
|
|
|
I don't think this is possible without something like java or activex
Brad
Australian
- bryce on "Problems with Code Project"
*sigh* Maunder's been coding again...
|
|
|
|