|
<%@ Control Language="C#" Inherits="DNA.Mvc.DynamicUI.WidgetViewUserControl<MailMessageModel>" %>
<%:Ajax.RenderAutoSettingForm(PropertyDescriptors, IDPrefix, IsDesignMode)%>
<%=Html.ScriptRefs("jquery.validate.min.js", "MicrosoftMvcJQueryValidation.js")%>
<%
if (!string.IsNullOrEmpty(this.CurrentWeb().SiteMailAccount))
{
%>
<div id='<%="MailFormContainer"+IDPrefix %>'>
<% Html.EnableClientjQueryValidation(); %>
<%:Html.ValidationSummary() %>
<% using (Ajax.BeginAjaxForm("SendMailTo", "Widget",
new jQueryAjaxOptions() { UpdateTargetID = "MailFormContainer" + IDPrefix,
InsertionMode = InsertionMode.Replace }, null))
{ %>
<table>
<tr>
<td>
<%:Html.Global("RES_NAME")%>(*)
</td>
<td>
<%:Ajax.TextBox("SenderName", "")%>
<%: Html.ValidationMessageFor(m=>m.SenderName)%>
</td>
</tr>
<tr>
<td>
<%:Html.Global("RES_EMAIL")%>(*)
</td>
<td>
<%:Ajax.TextBox("Sender", "")%>
<%: Html.ValidationMessageFor(m=>m.Sender)%>
</td>
</tr>
<tr>
<td colspan="2">
<%:Html.Global("RES_CONTENT")%>(*)
</td>
</tr>
<tr>
<td colspan="2">
<%:Ajax.TextArea("MailBody", "", new { rows=10 })%>
</td>
<%: Html.ValidationMessageFor(m=>m.MailBody)%>
</tr>
<tr>
<td colspan="2" style="text-align: center">
<%:Ajax.Submit(Html.Global("RES_SEND")) %>
</td>
</tr>
</table>
<%-- <input type="hidden" name="Receiver" value='<%:UserData["Receiver"]!=null ? UserData["Receiver"] as string: this.CurrentWeb().SiteMailAccount %>' />--%>
<input type="hidden" name="Subject" value='<%:UserData["Subject"]!=null ? UserData["Subject"] as string : "" %>' />
<%} %>
</div>
<%} else { %>
<div style="padding:10px;" class="ui-state-highlight">
The web master email not set.Please check you Smtp settings in Web console first.
</div>
<%} %>
<%=Html.StartupScripts() %>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
In 1999, I started programming using Delphi, VB, VJ.From 2002 I started with .NET using C#.Since 2005 when i had became an EIP product manager I was focus on EIP and CMS technique. In 2008 i established dotnetage.com and started to shared my ideas and projects online. I believe "No shared no grow"
www.dotnetage.com