[thelist] Still having .net email contact page problem
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Mon Mar 7 11:13:23 CST 2005
Hi Tom,
I think I just realized your problem. You said the other page posts to this one (i.e. this is a different page from where the user enters those values)? That means that the name and comments fields don't exist in the ViewState of the current page. You'll have to get a bit more old-school to grab those values.
string myName = Request.Form("name");
string myComments = Request.Form("comments");
...should do the job.
From: Tom Dell'Aringa pixelmech at yahoo.com
Sorry for reposting this but I am still stuck :( Shouldn't be this hard I'm thinking. Again, I
have a simple form with two fields. I want to process those two fields and include that text in
the body of an e-mail and send it off.
Currently my form submits to the processing page below. The two lines
string myName = name.Text;
string myComments = comments.Text;
follow the convention inputID.Text of the form. I've tried Dim'ing them too. Either way it errors
out so I am doing this wrong somehow, i either get that I need a semi-colon (which is there) or
the namespace type cannot be found.
here is the processing page:
---------------
eHandbook Feedback" +
"
Comments:
" + myComments + "";
msgMail.Body = strBody;
SmtpMail.Send(msgMail);
Response.Write("Email was queued to disk");
%>
-------------
If I remove those two lines it works fine, so I just need to correctly get my form data into a
varaible - should be a simple thing I know, but can't seem to figure it out.
Thanks
Tom
http://www.pixelmech.com/
Melissa: Ace, Where are you?
Ace Ventura: I'm in Psychoville and Finkle's the Mayor.
More information about the thelist
mailing list