RE: Free Contact Form Generator for Expression Web (Full Version)

All Forums >> [Web Development] >> Expression Web Help



Message


WantToLearn -> RE: Free Contact Form Generator for Expression Web (11/24/2007 11:46:28)

quote:

ORIGINAL: onlyme
One question - I noticed that your programming requires a username and password for SMTP authentication. I'd rather not put that information into the programming of a page that can be seen by others. Is there an alternative?
Thanks again!


Hi onlyme and welcome to the forums. Great question. In the world of websites, there are two general kinds of code: client code and server code. Examples of client code are HTML and Javascript. Client code is processed in the user's web browser and is therefore visible to end user (through "View Source"). Server code, on the other hand, is processed on the web server and the actual code is never sent to the user's web browser, only the results of the code. The code is only visible to you, the creator, at design time. When the page is served using a web server, all of the server code is executed and removed from the page and just the resulting HTML is sent. Examples of server code are ASP, ASP.NET, PHP, ColdFusion and many others. My form generator creates ASP.NET code and so your SMTP info is never visible to the end user.

See for yourself: click the link below for a live demo of the contact form and do a "View Source" to look at the code. You'll find no SMTP info and no ASP.NET code.

http://www.ctrfx.com/form/demo.aspx

Hope this helps.





onlyme -> RE: Free Contact Form Generator for Expression Web (11/25/2007 15:54:36)

Thank you for the quick response. You're too kind to say that my question was a "great question" because it showed that I don't have a clue! Thanks for teaching me the basics and again thanks for invaluable help in getting my contact form done!




onlyme -> RE: Free Contact Form Generator for Expression Web (11/27/2007 19:58:44)

I tried to use your code on a second site I have up and got stuck! I don't know how to figure out where the problem is with the following. Can you help?

Server Error in '/My Web Sites' Application.
--------------------------------------------------------------------------------

Control 'Email' of type 'TextBox' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Control 'Email' of type 'TextBox' must be placed inside a form tag with runat=server.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Control 'Email' of type 'TextBox' must be placed inside a form tag with runat=server.]
System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +214
System.Web.UI.WebControls.TextBox.AddAttributesToRender(HtmlTextWriter writer) +49
System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +17
System.Web.UI.WebControls.TextBox.Render(HtmlTextWriter writer) +17
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +294
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +21
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +294
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
System.Web.UI.WebControls.MultiView.Render(HtmlTextWriter writer) +23
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +294
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +21
System.Web.UI.Page.Render(HtmlTextWriter writer) +27
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +294
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7425




WantToLearn -> RE: Free Contact Form Generator for Expression Web (12/6/2007 14:04:46)

Post the code for the entire page and I'll take a look at it.




onlyme -> RE: Free Contact Form Generator for Expression Web (12/6/2007 21:15:33)

Thanks for your help! I just emails you the code.




intouchweb -> RE: Free Contact Form Generator for Expression Web (12/11/2007 7:04:51)

Hi,

Firstly, when I submit the form on your own Contact web page I get the error "Due to technical difficulty, your message may NOT have been sent."

Is there a problem with the set up of your own form?

Now the reason I was trying to contact you...can you please help me...

I just wanted you to clarify for me whose smtp mail server /username/password details are actually required here...

Dim smtpMailServer As String = "mail.yoursmtp.com"
Dim smtpUsername As String = "yourusername"
Dim smtpPassword As String = "yourpassword"

I am confused because the form is being submitted from the host server, so what would my smtp server details as provided by my ISP have to do with it..? Do I need to get the host server's outgoing mail details or the email recipients details???

I must be doing something wrong because all I get is the same error as your own site.. ! ie "Due to technical difficulty, your message may NOT have been sent."

Thanks




kraps2312 -> RE: Free Contact Form Generator for Expression Web (12/20/2007 13:11:02)

Thank you for a very nice Contact Form. Really helps out for those like me new to asp.net. Your form works great for me as a .aspx page on my local host Development server only!!
My problem and challenge is my site uses master pages and content pages and the code fails no matter where it is installed. I asume that part code must go to the master page and the rest in the content page. any one else have success using this Contact form with master pages in asp.net?

Followup. I have the page now working. I just removed the master page from the content page and have no problems working with the form.
It sends emails just fine thru Expression Web local host Development Server but DOES NOT work after the page has been published.
I use GoDaddy as a host.

Any Ideas??? I have double checked all codes. thanks




WantToLearn -> RE: Free Contact Form Generator for Expression Web (12/31/2007 17:35:12)

Try using relay-hosting.secureserver.net for the SMTP server.

The STMP server “relay-hosting.secureserver.net” belongs to GoDaddy and is apparently the only SMTP server they allow to use with ASP.net email solutions.




miket007 -> RE: Free Contact Form Generator for Expression Web (1/5/2008 5:19:12)

Hi to all at OutFront,

firstly may I say that this contact form is very good exellant!

But like the Kraps2312, I to have trouble adding the result to another webpage.aspx.

He said he took out the master page from the content page, what did you mean by that.

Thanks I'm new to ASP.net and visual web developer




omegaman -> RE: Free Contact Form Generator for Expression Web (4/7/2008 19:46:43)


quote:

ORIGINAL: intouchweb

Dim smtpMailServer As String = "mail.yoursmtp.com"
Dim smtpUsername As String = "yourusername"
Dim smtpPassword As String = "yourpassword"




Thsi is what I use and it works for me

smtpMailServer "localhost"
smtpUsername this is what you use as a login to email
smtpPassword the password for this email account

Hope this helps ya




nucrime -> RE: Free Contact Form Generator for Expression Web (4/12/2008 16:50:07)

I hope this error isn't too basic and that someone can help me.
I am trying to use the form creator but I get the following error:

Error Creating Control - YourForm
The ID 'State' is already used by another control.

Does anyone have any ideas?

Thanks in advance




Mike54 -> RE: Free Contact Form Generator for Expression Web (4/22/2008 9:13:54)

quote:

Error Creating Control - YourForm
The ID 'State' is already used by another control.

You included both "form fields" for including a State in the email. Remove one or the other of the fields or open your page in code view and rename one of them to state1 (in 2 places).




nucrime -> RE: Free Contact Form Generator for Expression Web (4/22/2008 15:36:35)

Thanks for your help!!
So that problem is resolved, but now I'm getting:
--------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: 'SubmitForm_Click' is not a member of 'ASP.about_tkk_contact_aspx'.

Source Error:



Line 217: <br />
Line 218: <br />
Line 219: <asp:Button ID="SubmitForm" runat="server" OnClick="SubmitForm_Click" Text="Submit Form" />
Line 220: <br />
Line 221: </asp:View>
-----------------------------------------

As you can tell, I've renamed the file "about_tkk_contact"

I'm super new to this as you can probably tell. I really appreciate all of the help!

Ken




SheSharp -> RE: Free Contact Form Generator for Expression Web (4/26/2008 11:00:08)

RED FLAG! The code in this form requires the Username and Password to your web host control panel. Nobody, but nobody should request this information. The person who created this form, whose name is imbedded in the code, will have access to your control panel (and possibly the credit card you used to set up the account) as will anyone who hacks into your code page. I have never seen any mail code, form or otherwise, that requests this vital information for mail to be delivered. Please look into Jmail, a widely used free mail forwarding program, and note the simplicity of their code.




WantToLearn -> RE: Free Contact Form Generator for Expression Web (4/26/2008 11:24:22)

quote:

ORIGINAL: SheSharp

RED FLAG! The code in this form requires the Username and Password to your web host control panel. Nobody, but nobody should request this information. The person who created this form, whose name is imbedded in the code, will have access to your control panel (and possibly the credit card you used to set up the account) as will anyone who hacks into your code page. I have never seen any mail code, form or otherwise, that requests this vital information for mail to be delivered. Please look into Jmail, a widely used free mail forwarding program, and note the simplicity of their code.


Woha, hold on there SheSharp. Where are you getting the idea that this form requires the username and password to your web host control?! That is simply not true.




SMaitz -> RE: Free Contact Form Generator for Expression Web (5/8/2008 19:13:58)

I went to your site and the form works great. I do have one question - Is there a way to configure the e-mail so it's not line text? I attempted to add some code but the form didn't like it. I was attempting to make the e-mail format html so it would be easier to read. Any suggestions?




sarfdesign -> RE: Free Contact Form Generator for Expression Web (6/16/2008 4:14:56)

hi friend,
first of all thnkz for the gr8 form i m searching since long. but now i m facing problem. i did as per ur instruction and uploaded in my webserver. getting this error.

--------
Server Error in '/' Application.
--------------------------------------------------------------------------------

Using themed css files requires a header control on the page. (e.g. <head runat="server" />).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).]
System.Web.UI.PageTheme.SetStyleSheet() +1948966
System.Web.UI.Page.OnInit(EventArgs e) +2009808
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692

---------

plz help me i m a designer thats why i cant figure it out I will be thankful to u.
waiting for ur reply
Regards,
Sarfaraz




Mollee -> RE: Free Contact Form Generator for Expression Web (7/1/2008 9:30:43)

So, why does the code have the username and password? If I house my own web server, is this required? And, what happens if I leave those lines out? Shouldn't the contact email just be sent to the sendresultsto string? I'm new at asp.net, have had some java and c++, and I'm just a little confused about these lines of the code.

Thanks!




cb aspnet newbie -> RE: Free Contact Form Generator for Expression Web (7/23/2008 19:07:24)

Hello,
First let me say that your form is amazing. I would have paid for this form generator. Great great product.

Ok, now to reveal my newbieness. I have just entered the asp.net foray and am, like everyone having trouble with it.
So I loaded your form, following the steps (even changing the c# to VB).
it uploads fine to my windows server (which does support asp/asp.net 1.1/2.0). So I know it meets all the requirements that you mentioned.
The problem is that when i try to submit the form from the site (not previewing from expression web), I get the following error page (i changed the code like you suggested to reveal the error).

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>


Obviously I have no idea what any of this means, and maybe this is too broad, but i though i would give it a shot and see if you could provide some help.
I know this is a free product, so any advice is very much appreciated.

thanks much.




WantToLearn -> RE: Free Contact Form Generator for Expression Web (7/25/2008 15:34:41)


quote:

ORIGINAL: Mollee

So, why does the code have the username and password? If I house my own web server, is this required? And, what happens if I leave those lines out? Shouldn't the contact email just be sent to the sendresultsto string? I'm new at asp.net, have had some java and c++, and I'm just a little confused about these lines of the code.

Thanks!


Email 101

An email cannot be sent without a mail server to send it. If you've ever set up an email account in a program like MS Outlook or Thunderbird, you know that you have to specify an "outgoing" SMTP mail server name and usually its accompanying username and password. If you use something like Gmail or hotmail, its all behind the scenes and you don't have to set it up but it still uses an outgoing SMTP mail server to send your email. Sending an email programmatically through a contact form is no different; there still has to be an SMTP outgoing mail server to send the message. So, whether your house your own web server or use a shared host, you have to tell the code which SMTP server to use and most SMTP servers also require a username and password.




WantToLearn -> RE: Free Contact Form Generator for Expression Web (7/25/2008 15:40:45)


quote:

ORIGINAL: cb aspnet newbie

Hello,
First let me say that your form is amazing. I would have paid for this form generator. Great great product.

Ok, now to reveal my newbieness. I have just entered the asp.net foray and am, like everyone having trouble with it.
So I loaded your form, following the steps (even changing the c# to VB).
it uploads fine to my windows server (which does support asp/asp.net 1.1/2.0). So I know it meets all the requirements that you mentioned.
The problem is that when i try to submit the form from the site (not previewing from expression web), I get the following error page (i changed the code like you suggested to reveal the error).

....

Obviously I have no idea what any of this means, and maybe this is too broad, but i though i would give it a shot and see if you could provide some help.
I know this is a free product, so any advice is very much appreciated.

thanks much.



If you open the page on your local computer in Expression Web and then click the "Preview in Browser" button, it should launch the ASP.NET development server in your system tray and the page will load in your default web browser. Does the page display correctly then?




Page: <<   < prev  1 [2]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.1425781