473,486 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to read in 150 checkbox values and output to email body?

7 New Member
I have a form with 150 checkboxes. Need to send email with the Checked ones usng ASP. But i am unable to figure a simple way to do it. All i can understand is getting their values one by one and creating variables for all of them in the asp file and then put each in the body of the email body.

Please help me with a Simple Solution! If you show me with a Code then it will he highly appreciated.

Thanks in advance..

Aslam
Dec 2 '10 #1
9 2720
jhardman
3,406 Recognized Expert Specialist
Expand|Select|Wrap|Line Numbers
  1. For each x in request.form
  2.    'Perform some code here for each checkbox such as
  3.    Response.write x.name & ": " & x.value & "<br>" & vbnewline
  4. Next
does this suggest a solution to your problem?

Jared
Dec 2 '10 #2
Aslam Shah
7 New Member
please make it more simpler.. any short way to handle 170 checkboxes..
Dec 3 '10 #3
jhardman
3,406 Recognized Expert Specialist
This is unquestionably the simplest way to do it. Show me the code you use to put one or two checkboxes in an email, and I will show you how to adapt this loop for your code.

Jared
Dec 3 '10 #4
Aslam Shah
7 New Member
Dim checkbox

checkbox=request.form("checkbox")

varBody = checkbox. bla bla bla

so its a very long process to do it one by one .. so i need the array methods.. that i can learn and use on it and on future work..

thanks
Dec 3 '10 #5
jhardman
3,406 Recognized Expert Specialist
You don't need an array, you need a loop like the one I showed in my first response.
Expand|Select|Wrap|Line Numbers
  1. for each x in request.form
  2.    VarBody = varBody & x.name & ": " & x.value & "<br>" & vbnewline
  3. Next
it loops through each item submitted in your form, and adds each to a new line in your mail body.

Jared
Dec 3 '10 #6
Aslam Shah
7 New Member
so i just have to declare all of them first and then use this loop in the body right!! let me try and get back

so i should name x ( that you used ) as checkbox
Dec 3 '10 #7
jhardman
3,406 Recognized Expert Specialist
You don't have to declare anything, the script already has access to the request object. Just loop through it.

Jared
Dec 3 '10 #8
Aslam Shah
7 New Member
ok thanks i will get back with the results
Dec 3 '10 #9
Aslam Shah
7 New Member
this is what i am trying to do . .but no results.. error about the saying the Objec Required name
Expand|Select|Wrap|Line Numbers
  1. for each checkbox in request.form 
  2. varbody = "aslam" & varbody & checkbox.name & ": " & checkbox.value & "<br>" & vbnewline
  3. Next 
Dec 5 '10 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
8847
by: Chuck Amadi | last post by:
Has anyone got a simple python script that will parse a linux mbox and create a large file to view . Cheers Chu
16
6944
by: Chuck Amadi | last post by:
Sorry to bovver you again (again) here's script. I still can't see why the get_payload() doesn't produce the plain text message body of an emails in the testwwws users mailbox. As you can see I...
1
6544
by: dave | last post by:
Hi There Is there any how can we attach html page into email body by just encoding url ? something like with oMsg .From="blah blah blah" .To="abc@xyz.com" .body=www.mysite.com/default.htm...
6
3437
by: mike | last post by:
I have created a side application in VB.NET which reads rows from a DB and builds an email message. when i have a long string the the mailmessage.body or the mailmessage, it puts in an...
16
9511
by: TJO | last post by:
I am trying to pre populate an email body using javascript. I cannot figure out how to control the carraige returns for the text. The standard \r\n is not working. Is there another technique I...
1
1799
by: Yoav | last post by:
I need to run multiple console apps in the background and to watch their output. I have no idea if this is possible, and I don't even know where to start looking. The processes are watchers,...
2
2077
by: William Gower | last post by:
I am creating an email message to be sent from a web page. How do I embed variables like strFirstName, strLastName etc. into the body I would like it to say. Last Name : strLastName ...
0
4207
by: RickVidallon | last post by:
Missing or Truncated Body Text in Email Application - 2 Strange Examples... There is no earthly reason why this is happening! EXAMPLES HERE: http://65.36.227.70/actmailer/ We have a...
1
6145
by: salad | last post by:
I can store in a a hyperlink like this ClickMe#http://www.test.com in Access ClickMe is the display text, http://www.test.com the address. Is it possible, using SendObject, to send this...
5
9149
AllusiveKitten
by: AllusiveKitten | last post by:
Hi All I was just wondering if it was possible to send a report as the email body. I am wanting to send an automatic email to multiple people which will be personalised with their names etc. ...
0
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7173
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
6839
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
7305
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...
1
4863
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
4559
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...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
259
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.