can someone please provide me with sample code on how to capture user data, upload a file and send all this data and uploaded file via email. thanks in advance.
Jun 10, 2011 at 11:29 AM
Create a Web Forms user control (ascx) that does the job and include it on your page using the Composite.AspNet.LoadUserControl() function.
The asp.net work can be broken up into
uploading files via a form and
sending a file attachment via an e-mail.
Note that you need to update web.config with information about what e-mail server (SMTP server) to use for sending e-mail - this configuration is specific to your environment. We have written a
small guide on SMTP configuration you can use.
the problem I am having is after creating the pages its not executing my code behind, it works if I run the ascx on a separate project but not when I call it from the composite.asp.net.loadusercontrol(). what is the proper way to configure to make
sure the code behind is executed/fired. thanks in advance
here my setup:
part of template (pay attention to the asp:form tag - its must!):
public partial class Controls_WebUserControl : UserControl
protected void Page_Load(object sender, EventArgs e)
protected void Button1_Click(object sender, EventArgs e)
Button1.Text = "OK";
when I click - got OK.
Hope it's helps.