Here you go!
MemberInfo.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPages/TwoColumn.master" AutoEventWireup="true"
CodeBehind="MemberInfo.aspx.cs" Inherits="NopSolutions.NopCommerce.Web.MemberInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="server">
<asp:Label ID="ResultLabel" ForeColor="Red" runat="server" ></asp:Label><br />
Name: <asp:TextBox ID="NameTextBox" runat="server"></asp:TextBox><br />
Company: <asp:TextBox ID="CompanyTextBox" runat="server"></asp:TextBox><br />
Contact #: <asp:TextBox ID="ContactNumberTextBox" runat="server"></asp:TextBox><br />
Mobile phone: <asp:TextBox ID="MobilePhoneTextBox" runat="server"></asp:TextBox><br />
Address: <asp:TextBox ID="AddressTextBox" runat="server"></asp:TextBox><br />
# of Attendants: <asp:TextBox ID="AttendantTextBox" runat="server"></asp:TextBox><br /><br />
<asp:Button ID="SubmitButton" runat="server" Text="Submit"
onclick="SubmitButton_Click" />
</asp:Content>
MemberInfo.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using NopSolutions.NopCommerce.BusinessLogic.Messages;
namespace NopSolutions.NopCommerce.Web
{
public partial class MemberInfo : BaseNopPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void SubmitButton_Click(object sender, EventArgs e)
{
string mailContent = string.Format("Name: {0}, Company:{1}, Contact#:{2}, Mobilephone:{3}, Address:{4}, Attendants:{5}", NameTextBox.Text, CompanyTextBox.Text, ContactNumberTextBox.Text,
MobilePhoneTextBox.Text, AddressTextBox.Text, AttendantTextBox.Text);
try
{
MailAddress from = new MailAddress(MessageManager.AdminEmailAddress, MessageManager.AdminEmailDisplayName);
MailAddress to = new MailAddress("
[email protected]");
MessageManager.SendEmail("Member Info", mailContent, from, to);
ResultLabel.Text = "email successfully sent";
}
catch (Exception ex)
{
ResultLabel.Text = "Error: " + ex.Message;
}
}
}
}
Add it to nopCommerceStore root folder, create a link some where to it and you ready to go.
I am not a graphic designer, so you make it beautiful yourself. But most importantly, It runs.
I am in need of same requirement as like above(a feedback form which mails the clients request to admin)., but i am using NOP2.60. How can i customize this form for 2.60 version.? bcz in above they mentioned for master pages., but we not using those columntwo.master at right now. how to change the above code for .cshtml file.? Any one pls update the above code for 2.60 version. and pls mention where to add this file(root directory).? I am very new to mvc applications.