|
Try it like this. this is very simple.
string To = "cgodinez@technomex.net";
string From = "mymail@mail.com";
string Subject = "The Famous";
string Body = "Hello World";
SmtpMail.Send(From,To,Subject,Body);
We have to create an object (MailMessage) called myMail
MailMessage myMail = new MailMessage();
myMail.To = To;
myMail.Cc = "acarboncopy@cc.com";
myMail.From = From;
myMail.Subject = Subject;
myMail.BodyFormat = MailFormat.Html;
string body = "<html><body> Bolded message
<P>The Message</P> </body></html>";
myMail.Body = body;
myMail.Attachments.Add(new MailAttachment("c:\\filename.jpg"));
SmtpMail.Send(myMail);
Regards,
Satips.
|
|
|
|
|
hi friends
please tell me clear idea about datalist paging in ASP,C#.net.Already i refered lot of websites unfortunately, i didnot get clear idea about datalist paging
can anybody help me??
regards
saravanan
|
|
|
|
|
|
Dear Developers
I have integrated my Web App with Authorize.net AIM method. Now I want to store Transaction Number after successfull transaction.
I googled around for this but cudn't get the right solution for this. Please help me out...
Lets work it Out.........!
|
|
|
|
|
give me steps to create virtual directory in .net project.
thanks
|
|
|
|
|
Hi,
To create a new virtual folder in IIS, follow these steps:
1)Right-click the Default Web Site icon in IIS, and from the New menu click Virtual Directory
2)IIS starts the Virtual Directory Creation Wizard to walk you through creating a new virtual folder. Click Next on the wizard title page to display the Virtual Directory Alias page
3)Type an alias for the folder. The alias is name you will use to identify the resource in this folder. In Visual Studio .NET, this is the name you will use to specify the location of your project. Click Next. The wizard displays the Web Site Content Directory page
4)Type the path specification of the physical folder to associate with the virtual folder. This is the base folder where your project folders will be stored. Click Next. The wizard displays the Access Permissions page
5)Keep the default permissions. Click Next and then click Finish to create the virtual folder and end the wizard
Sandeep Kumar.V
|
|
|
|
|
hi, man its so easy. there is another and extremely easy.
Follow these steps.
1- make a new folder wher ever u want.
2- rename it.(whatever name u want to give it.)
3- rightclick the folder.
4- click sharing and security.
5- click web sharing.
6- fill the fields bellows.
thts it.
|
|
|
|
|
man...it's done manually...IMO, he means he want to create virtual directory thru code in .NET
<< >>
|
|
|
|
|
am using history.go() to go back to previous page on click of the back button .The problem is if i am adding something to the database and then going back with the back button the gridview is not getting updated since it is history page . so how can this be solved . How can i refresh the page.
pls help me out .
|
|
|
|
|
You mean you want to refresh the web page thru js?
<< >>
|
|
|
|
|
|
try window.reload(..), let me know if it works
<< >>
|
|
|
|
|
Hi i am using frameset in my page...,
In that frame set,one side i'm showing links,
if i click that links, in another html page my aspx page will be display...,
In that aspx page want to be adjust based on user property...,
It means,now i am using in that aspx page scroll tab...,
But with out scroll tab if i try to show some of the information on that page will be hide..,
But i want to show all information with out using scroll tab...,
How its possible plz help me...,
Magi
|
|
|
|
|
Still not got your clue...I think no problem currently how can user view the content withourt scrolling if the content exceed the web page???
<< >>
|
|
|
|
|
i m getting error:SERVER APPLICATION ERROR: while running any project in asp.net web application using .net 2003 version.
thanks
-- modified at 6:23 Wednesday 18th April, 2007
|
|
|
|
|
|
HI!
I have one quite short question. Does anybody know how instruct an update panel to update its context, without assigning a server side control(asp:Button) to do that.
|
|
|
|
|
You mean updating every an interval time?
<< >>
|
|
|
|
|
I need to do the following. Using ajax.net i create HttpRequest to the server, but with the difference that if server has no data for the client, the connection is not closed, but it is kept open. So when the data for the client arrives, the server can forward the data to the client. The data is just an id of the update panel that needs to update its content. So when the data arrives I need to instruct the specified update panel to update its content.
|
|
|
|
|
Hi
I currently have a form for people to fill in, with this they need to uplaod a profile picture of themselves. At the moment I have the following code which uploads the image, but i want to be able to resize the image to a certin size. Ive seen resizing help on the web, but most of these seem to be large/thumbnail codes and im getting a bit boggled!
Boolean fileOK = false;
String path = Server.MapPath("~/uploadedconsultantimages/");
if (UploadImage.HasFile)
{
String fileExtension =
System.IO.Path.GetExtension(UploadImage.FileName).ToLower();
String[] allowedExtensions =
{ ".gif", ".png", ".jpeg", ".jpg" };
for (int i = 0; i < allowedExtensions.Length; i++)
{
if (fileExtension == allowedExtensions[i])
{
fileOK = true;
}
}
}
if (fileOK)
{
try
{
UploadImage.PostedFile.SaveAs(path
+ UploadImage.FileName);
FileUploaded.Text = "File uploaded!";
}
catch (Exception ex)
{
FileUploaded.Text = "File could not be uploaded.";
}
}
else
{
FileUploaded.Text = "Cannot accept files of this type.";
}
Any help would be appreciated. I working in c# .net2
Thanks
Adam
|
|
|
|
|
http://www.peterprovost.org/archive/2003/05/29/516.aspx[^]
I haven't played around with the Upload stuff yet so not sure whether you can access the uploaded file in memory and resize it before saving it.
If not, then you simply need to use something like
Boolean fileOK = false;<br />
String path = Server.MapPath("~/uploadedconsultantimages/");<br />
if (UploadImage.HasFile)<br />
{<br />
String fileExtension =<br />
System.IO.Path.GetExtension(UploadImage.FileName).ToLower();<br />
String[] allowedExtensions = <br />
{ ".gif", ".png", ".jpeg", ".jpg" };<br />
for (int i = 0; i < allowedExtensions.Length; i++)<br />
{<br />
if (fileExtension == allowedExtensions[i])<br />
{<br />
fileOK = true;<br />
}<br />
}<br />
}<br />
<br />
if (fileOK)<br />
{<br />
try<br />
{<br />
UploadImage.PostedFile.SaveAs(path<br />
+ UploadImage.FileName);<br />
<br />
Bitmap source = Bitmap.FromFile(path + UploadImage.FileName);<br />
Bitmap result = new Bitmap(250,250);<br />
using(Graphics g = Graphics.FromImage((Image)result);<br />
g.DrawImage(source, 0, 0, 250, 250);<br />
result.Dispose();<br />
source.Dispose();<br />
result.Save(path + UploadImage.FileName);<br />
<br />
FileUploaded.Text = "File uploaded!";<br />
}<br />
catch (Exception ex)<br />
{<br />
FileUploaded.Text = "File could not be uploaded.";<br />
}<br />
}<br />
else<br />
{<br />
FileUploaded.Text = "Cannot accept files of this type.";<br />
}
This is untested, but basically "should" resize the uploaded image to 250x250.
|
|
|
|
|
Thanks for this, but im getting errors of the type or namespace could not be found for bitmap and graphics?
|
|
|
|
|
Add System.Drawing in your application
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Thanks, im still getting build errors though:
Error 1 Cannot implicitly convert type 'System.Drawing.Image' to 'System.Drawing.Bitmap'. An explicit conversion exists (are you missing a cast?)
Bitmap source = Bitmap.FromFile(path + UploadImage.FileName);
Thanks
|
|
|
|
|
Bitmap source = (Bitmap)Bitmap.FromFile(path + UploadImage.FileName); try this
Does it will help you ?
Bitmap.FromFile(path + UploadImage.FileName);
return type is Image Why you want to convert it into Bitmap
What you want to do ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|