如何编辑编译的ASP.net网站? [英] How to edit compiled ASP.net website?

查看:185
本文介绍了如何编辑编译的ASP.net网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,公布这里

在联系我们页面,上面链接,有一个下拉菜单。

On the contact us page, linked above, there is a drop down menu.

根据该菜单中的内容类型的选择,不同的人通过电子邮件发送。

Depending on the selection of the content type in that menu, a different person is emailed.

原来的开发商,显然是为了我的经验不足的眼睛至少,硬codeD为这些人的电子邮件地址。

The original developer, apparently to my inexperienced eyes at least, hardcoded the email addresses for those people.

有几个人已经离开了公司,而且我们保持他们的电子邮件地址,并检查只针对他们这些Web接触的目的。

Several of them have left the company, and we are maintaining their email addresses and checking them solely for the purpose of these web contacts.

在理想情况下,我想建立网站管理页面上的控件允许的地址在将来进行编辑。

Ideally, I would like to set up a control on the website admin page to allow the addresses to be edited in the future.

我可以查看和编辑联系我们页面在VS 2010中(目前使用的网络矩阵和VS 2010前preSS但我有VS 2010专业版为好。)

I can see and edit the contact us page in VS 2010 (currently using web matrix and VS 2010 Express but I have VS 2010 Professional as well.)

我的经验是非常有限的,所以我将有机会学习了很多,我想到,要做到这一点。

My experience is very limited, so I will have to learn a lot, I expect, to make this happen.

足够的背景知识,我希望。我需要的是寻找到电子邮件是codeD。下拉菜单显示了涉及选择的选择一个标识符,但我找不到什么,涉及到,或者是控制它涉及到电子邮件(或它发布到时,发送点击)。

Enough background, I hope. What I need is to find where the emails are coded. The dropdown shows a identifier which relates to the selected choice, but I can't find what that relates to, or what control relates it to an email (or where it posts to when "Send" is clicked.)

我提前道歉我缺乏知识。我想学习,我有工作要做。我会尽量不吸太多的任何人的时间,我会尽力制定出我自己的,我所能。请让我知道我能提供什么进一步的数据。

I apologize in advance for my lack of knowledge. I'm trying to learn, and I have a job to do. I'll try not to suck up too much of anybody's time, and I'll try to work out on my own, what I can. Please let me know what further data I can provide.

这是code的下拉列表。如果有一个在这里,我需要的数据为基准,我找不到它。我可以张贴code的休息,如果必要的页面。

This is the code for the dropdown. If there is a reference here to where the data I need is, I can't find it. I can post the rest of the code for the page if necessary.

编辑:我张贴整个页面。下拉似乎太基本是帮助。

I posted the whole page. The dropdown seemed too basic to be of help.

编辑:发布源$ C ​​$ C

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Mail;

public partial class ContactUs : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{

    Calendar cal = new Calendar();
    string dat = cal.TodaysDate.Date.ToLongDateString();

        System.Web.Mail.MailMessage mm = new MailMessage();
        mm.From = "WBS Website<info@wbs.ae>";
        if (DrpDwnType.SelectedItem.Value == "G")
            mm.To = "david@wbs.ae";
        else
            mm.To = "robert@wbs.ae";

        mm.Cc = "wolfi@wbs.ae";
        mm.Bcc = "precise.customer@gmail.com";
        mm.Subject = "Online comments from WBS website visitor, " + TXTFname.Text;
        mm.Body = "<div style='border:solid 2px RED; padding:25px 25px 25px 25px'><br><br> <strong>Online comments from WBS website</strong><br> <br> ------------------------------------- <br> Date : " + dat + "<br> <br> First Name : " + TXTFname.Text + "<br>Last Name : " + TXTLastName.Text + "<br> Email Address : " + TXTEmail.Text + "<br> Contact No : " + TXTMob.Text + "<br> Enquiry Type : " + DrpDwnType.SelectedItem.Text + "<br> <br> <br> The visitor comment : <br> --------------------------------------- <br> " + TXTComment.Text + "</strong><br><br>Further Information : " + RadioButtonList1.SelectedItem.Value.ToString() + "<br><br><br></div>";
        mm.BodyFormat = MailFormat.Html;
        SmtpMail.Send(mm);
        TXTFname.Text = "";
        TXTLastName.Text = "";
        TXTMob.Text = "";
        TXTComment.Text = "";
        TXTEmail.Text = "";
        TXTMess.Text = "Thank you for your interest in WBS!!! ";



}

}

推荐答案

在Web服务器上的网站的bin文件夹,你会发现一个或多个DLL文件。

In the BIN folder of the website on the web server you will find one or more DLL files.

这些文件可以被反编译到其源$ C ​​$使用工具,如 ILSpy

Those files can be "decompiled" to their source code using tools such as ILSpy.

在反编译整个code搜索关键字DrpDwnType,你应该看到的电子邮件地址是很难codeD。再次编译它后,你应该能够更新网站上的DLL文件以反映更改。

After decompiling the whole code search for the keyword "DrpDwnType" and you should see where the email addresses are hard coded. After compiling it again you should be able to update the DLL files on the website to reflect the changes.

这篇关于如何编辑编译的ASP.net网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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