473,497 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help Needed

Hello

I wounder if anybody could help me. I am new to C# and want to write a
script that handles feedback from my customer etc on my website. I have
looked around the internet and have not found any examples.

Thank you for your help

mike
Nov 15 '05 #1
3 1007
Mike:

All you need to do is drag and drop your controls onto a form that will
allow the user the enter the feedback. Then, if you have a good backend
like SQL Server/Oracle, DB2 etc, create a stored procedure for the update.
Otherwise you'll have to use Dynamic SQL. Make each of the control values a
Paramater (Look up IDBParameter, on MSDN for examples). Then, open up a
connection, declare a command object and set the commandtext to the name of
the proc or your sql string, set its connection to the connection you just
declared. Add each of the parameters to the Command's Parameters
collection.

Finally, call the .ExecuteNonQuery method. YOu can actually do most of this
by dragging connections and the like onto your form and it probably won't
take more than 10 lines of code (depending on the number of parameters) to
do this.

Check MSDN out for .ExecuteNonQuery (or google), there's tons of stuff out
there.

HTH,

Bill
"Mike" <no****@nospam.com> wrote in message
news:Oj**************@TK2MSFTNGP11.phx.gbl...
Hello

I wounder if anybody could help me. I am new to C# and want to write a
script that handles feedback from my customer etc on my website. I have
looked around the internet and have not found any examples.

Thank you for your help

mike

Nov 15 '05 #2
Thanks for the help.
What I need is for the form then to be e-mailed to me with the information.
Any ideas ?


"William Ryan" <do********@comcast.nospam.net> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...
Mike:

All you need to do is drag and drop your controls onto a form that will
allow the user the enter the feedback. Then, if you have a good backend
like SQL Server/Oracle, DB2 etc, create a stored procedure for the update.
Otherwise you'll have to use Dynamic SQL. Make each of the control values a Paramater (Look up IDBParameter, on MSDN for examples). Then, open up a
connection, declare a command object and set the commandtext to the name of the proc or your sql string, set its connection to the connection you just
declared. Add each of the parameters to the Command's Parameters
collection.

Finally, call the .ExecuteNonQuery method. YOu can actually do most of this by dragging connections and the like onto your form and it probably won't
take more than 10 lines of code (depending on the number of parameters) to
do this.

Check MSDN out for .ExecuteNonQuery (or google), there's tons of stuff out
there.

HTH,

Bill
"Mike" <no****@nospam.com> wrote in message
news:Oj**************@TK2MSFTNGP11.phx.gbl...
Hello

I wounder if anybody could help me. I am new to C# and want to write a
script that handles feedback from my customer etc on my website. I have
looked around the internet and have not found any examples.

Thank you for your help

mike


Nov 15 '05 #3


This should get you started, hope it helps!(note it uses CDO, so make sure
you're up to date)

(assumes the presence of several textboxes)

using System.Web.Mail;

System.Web.Mail.MailMessage newMail = new System.Web.Mail.MailMessage();

his.newMail.To = this.textbox1.Text;

this.newMail.Subject = this.textBox2.Text;

this.newMail.From = "your return address";

this.newMail.Body = this.richTextBox.Text;

try

{

SmtpMail.SmtpServer = "your mail server address(www.mymail.com)";

SmtpMail.Send(this.newMail);

MessageBox.Show("Message Sent Successfully");

}

catch( System.Web.HttpException ehttp)

{

MessageBox.Show(ehttp.Message);

}
"Mike" <no****@nospam.com> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Thanks for the help.
What I need is for the form then to be e-mailed to me with the information. Any ideas ?


"William Ryan" <do********@comcast.nospam.net> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...
Mike:

All you need to do is drag and drop your controls onto a form that will
allow the user the enter the feedback. Then, if you have a good backend
like SQL Server/Oracle, DB2 etc, create a stored procedure for the update. Otherwise you'll have to use Dynamic SQL. Make each of the control values
a
Paramater (Look up IDBParameter, on MSDN for examples). Then, open up a
connection, declare a command object and set the commandtext to the name

of
the proc or your sql string, set its connection to the connection you

just declared. Add each of the parameters to the Command's Parameters
collection.

Finally, call the .ExecuteNonQuery method. YOu can actually do most of

this
by dragging connections and the like onto your form and it probably won't take more than 10 lines of code (depending on the number of parameters) to do this.

Check MSDN out for .ExecuteNonQuery (or google), there's tons of stuff out there.

HTH,

Bill
"Mike" <no****@nospam.com> wrote in message
news:Oj**************@TK2MSFTNGP11.phx.gbl...
Hello

I wounder if anybody could help me. I am new to C# and want to write a
script that handles feedback from my customer etc on my website. I have looked around the internet and have not found any examples.

Thank you for your help

mike



Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
3251
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical...
7
1876
by: ChadDiesel | last post by:
Hello everyone, I'm having a problem with Access that I need some help with. The short version is, I want to print a list of parts and part quantities that belong to a certain part group---One...
7
1749
by: Tina | last post by:
I have an asp project that has 144 aspx/ascx pages, most with large code-behind files. Recently my dev box has been straining and taking long times to reneder the pages in the dev environment. ...
10
14813
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the...
2
2888
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
2
1967
by: Steve K | last post by:
I got a bit of a problem I like some help on. I'm designing an online training module for people that work in food processing plants. This is my target audience. These workers have little or no...
3
2407
by: Kitana907 | last post by:
Hi- I'm attempting to write a module that uses and updates info from two tables and does the following: Opens the recordset of a table called "tblstoreinv" If the Needed Field in the...
9
2059
by: smartbei | last post by:
Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with...
2
2881
by: rookiejavadude | last post by:
I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone...
32
2749
by: =?Utf-8?B?U2l2?= | last post by:
I have a form that I programmatically generate some check boxes and labels on. Later on when I want to draw the form with different data I want to clear the previously created items and then put...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7197
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6881
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4584
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.