易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net,c#,vb,vbs,js各个语言的邮箱发送源代码

发送端以163为例
一、asp.net版   using System.Web.Mail; //命名空间引用 
c#
        MailMessage mail = new MailMessage();
        mail.To = "shadow103@qq.com";  //接受人的邮箱
        mail.from = "xxx@163.com";  //你自己的邮箱(注意qq邮箱不行)
        mail.Subject = "你好帅哥"; //邮箱标题
        mail.Body = "正文";
        mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing","2")
        mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //stmp验证
        mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", 你邮箱帐号"); 
        mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "你邮箱密码");   
        SmtpMail.SmtpServer = "smtp.163.com";  //代理邮件服务器
        SmtpMail.Send(mail);
vb
   Dim mail As New MailMessage()
   mail.To = "shadow103@qq.com"
   mail.from = "xxx@163.com"
   mail.Subject = "你好帅哥"
   mail.Body = "正文"
   mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing","2")
   mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'stmp验证
   mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "你邮箱帐号")
   mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "你邮箱密码 ")
   SmtpMail.SmtpServer = "smtp.163.com" '代理邮件服务器
   SmtpMail.Send(mail)


相关文档:

ASP.NET创建缩略图

在学习过程中发现如果要上传的照片很大的话,速度会很慢,所以采用了在上传照片时同时上传缩略图的方式,这样就可以既不影响多个图片的浏览,又不影响查看具体的图片。
需要用到的命名空间:
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;
#region 保存上传文件,方法名:UploadSave(string ......

在ASP.NET AJAX中防止用户多次提交页面

在Web开发程序中,往往由于种种原因,客户会多次操作页面导致数据冗余或不一致, 在ASP.NET AJAX出现之前可以通过对__dopostback()的调用等方法也可以防止页面多次提交。
在ASP.NET AJAX中的页面客户端中有一个叫onInitializeRequest的事件,它在页面初始化之前触发,可以对页面的提交事件进行控制,并且可以调用该事件参 ......

ASP.NET(C#)返回上一页(后退)代码

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ViewState["BackUrl"] = Request.UrlReferrer.ToString();
    }
}
/// <summary>
/// 返回按钮点击事件
/// </summary& ......

【ASP.net技巧】asp.net弹出窗口 返回值

刚刚 看到这么一个问题,这里也做个标记:http://topic.csdn.net/u/20080411/14/7b0f9da5-0413-4149-91e9-72c3df3018a3.html?seed=327251592
第一种方式:
//在Visual Studio 2008中调试通过
testPop_Page.aspx:主页面ASPX代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  ......

Asp.Net常用的三十三种代码

1. 打开新的窗口并传送参数:
  传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
  接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
  2.为按钮添加对话框
Button1 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号