我们如何在同一个项目中向其他开发人员隐藏(隐藏)某些CodeBehind行(例如,一个类)? [英] How can we hide (invisible) some CodeBehind lines (for example a class) from other developers in a common project?

查看:114
本文介绍了我们如何在同一个项目中向其他开发人员隐藏(隐藏)某些CodeBehind行(例如,一个类)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何在同一个项目中向其他开发人员隐藏(隐藏)某些代码隐藏行(例如类)?

How can we hide (invisible) some CodeBehind lines (for example a class) from other developers in a common project?

我问这个问题是因为今天我们正在处理电子邮件代码,我们希望向所有程序员发送电子邮件,并向我们的普通网站电子邮件发送电子邮件。

I asked this question because today we were working on email codes and we wanted to send an email to all of programmers emails therewith sending an Email to our common web site email.

我们如何隐藏每个密码其他吗?

How can we hide our passwords from each other?

是否可以设置3个类(用于向3个Web开发人员发送电子邮件)并隐藏或隐藏这些类(类文件或行后代码),因此每个peogrammer只能看到他的班级?

Is it possible to make 3 classess (for sending emails to 3 web developers) and hide or invisible those classes(class file or codebehind lines) and so each peogrammer can see only his class?

预先感谢////

电子邮件代码如下:

the email code is like :

protected void Button1_Click(object sender, EventArgs e)
{

    //create mail message
    MailMessage mail = new MailMessage();
    //set the address
    mail.From = new MailAddress("Kazemipour@gmail.com");
    mail.To.Add("aaak@yahoo.com");
    //set the content
    mail.Subject = "Project email";
    mail.Body = "Hello World!";

    //send the message
    SmtpClient smtp = new SmtpClient();
    smtp.UseDefaultCredentials = false;
    smtp.Credentials = new System‎‎.Net‎‎.NetworkCredential("aaa@gmail.com", "pass");
    smtp.Host = "smtp.gmail.com";
    smtp.Port = 587;             
    smtp.EnableSsl = true;





    try
    {

        smtp.Send(mail);
        Button1.Text = "sent";
    }
    catch (System‎‎.Net.Mail.SmtpException exp)
    {
        Label1.Text = exp.ToString();
    }

}


推荐答案

我建议创建并使用服务帐户(而不是您的个人帐户)从网站发送电子邮件。如果可能,请让您的邮件系统管理员免除此服务帐户的输入密码以发送电子邮件。根据我的经验,管理员通常会为低风险服务帐户设置例外情况(因为任何人都不会使用它来进行正常的互联网活动)。

I would suggest creating and using a service account, not your personal account, for sending email from a web site. If possible, have your mail system admins exempt this service account from requiring a password to send email. In my experience, admins are usually pretty good about making exceptions for lower risk service accounts (because it isn't used by any human for normal internet activity).

这篇关于我们如何在同一个项目中向其他开发人员隐藏(隐藏)某些CodeBehind行(例如,一个类)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆