All my issues on my two pages have been cleared up - Thanks Dean! - except for
one:
I need to put the CustomerID into the Subject line of a feedback form email as
well as their email address in the "From" line automatically from their record
in the dataset I created. I had thought something like <%#
dsQuotes.FieldValue("CustomerID", Container)%> would work but I get an error. I
tried hidden fields with the default values assigned then referenced in the
respective email lines. I am out of ideas and Googling is no help.
Here is what I have:
<%@ Import Namespace="System.Web.Mail" %>
<script language="vb" runat="server">
Sub doEmail(Source as Object, E as EventArgs)
Dim sMsg as String
sMsg+=chkTakeIt.Checked & vbcrlf
sMsg+=chkTestDrive.Checked & vbcrlf
sMsg+=chkPayments.Checked & vbcrlf
sMsg+=chkRightVehicle.Checked & vbcrlf
sMsg+=chkTooHigh.Checked & vbcrlf
sMsg+=tbxComments.Text & vbcrlf
Dim objEmail as New System.Web.Mail.MailMessage()
objEmail.To= ConfigurationSettings.AppSettings("ToAddress")
objEmail.Cc= ConfigurationSettings.AppSettings("CCAddress")
**objEmail.From=CUSTOMER_EMAIL_HERE!
**objEmail.Subject="Customer Number [" CUSTOMER_ID_HERE "]"
objEmail.BODY=tbxComments.Text
objEmail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "sendmail.myserver.com"
SmtpMail.Send(objEmail)
Response.Redirect("thankyou.aspx")
End Sub
</script>
<MM:DataSet
id="dsQuotes"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn_quotes")
%>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn_quotes")
%>'
CommandText='<%# "SELECT * FROM dbo.tbl_onlinequotes WHERE Email = @Email" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@Email" Value='<%# IIf((Not Request.Cookies("UserName") Is
Nothing), Request.Cookies(IIf((Not Request.Cookies("UserName") Is Nothing),
"UserName", 0)).Value, "") %>' Type="VarChar" />
<Parameter Name="@ModelName" Value='<%# IIf((Not Request.Cookies("ModelName")
Is Nothing), Request.Cookies(IIf((Not Request.Cookies("ModelName") Is Nothing),
"ModelName", 0)).Value, "") %>' Type="VarChar" />
</Parameters></MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
Please help! This is the last part of this site that needs me to work in .NET!
Thank you!
Jeff
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/