CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.club_web_site_starter_kit Tags:
Item Type: NewsGroup Date Entered: 6/5/2006 5:55:47 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 17 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
lexy
Asp.Net User
How to show the value of a Checkbox in a control6/5/2006 5:55:47 PM

0/0

Hi All,

 

Installed Franks Bulk Emailer, works like a charm. But I wanted to adapt it a little bit to my needs:

This is what I try to do:

 

Users when they register can check a Checkbox when they want to receive a Newsletter. (Datatype bit)

When I use the Bulk Emailer only the users that Checked that box on registering will be sent an e-mail.

 

Also added a Checkbox to Member_Details (where Users can change their Userinfo)

This Checkbox must of course show the value that is stored in the Database.

 

I believe the Controls on that page are filled with:

Sub InitPageData()

Dim user As MembershipUser = Membership.GetUser()

Dim da As New DataSetTableAdapters.MemberInfoTableAdapter

Dim dt As DataSet.MemberInfoDataTable = da.GetMember(CType(user.ProviderUserKey, Guid))

If dt.Rows.Count = 1 Then

Dim mr As DataSet.MemberInfoRow = dt(0)

UserName.Text = user.UserName

fname.Text = mr.firstname

lname.Text = mr.lastname

Email.Text = user.Email

Addr.Text = mr.address

Phone.Text = mr.phone

If

mr.IsNewsletterNull Then

Nieuwsbrief.Checked =

False

Else

Nieuwsbrief.Checked =

True

End If

 

With these last lines I try to show the value, but to no avail.

 

What am I doing wrong here?

Thanks,

Lex

 

 

 


I use VB
MaineOne
Asp.Net User
Re: How to show the value of a Checkbox in a control6/5/2006 6:58:50 PM

0/0

If your trying to pass the value to the memberinfo table

NewsletterValue = CheckBoxName.SelectedValue.ToString

NewsletterValue being the column name in the database

This will send either a 1 or 0 to the database.

Therefore there should not be a null value in the database.

0=false and 1= true

What you have written will show it as checked because 0 is not a null value.

You did not specify whether the box is showing to always be checked so maybe this will help.

btw I am modifing the original Bulk emailer page to allow role specific emails and also thanks to Marks suggestions change the way the emails actually go out.  Currently they all go out as individual emails and when you have alot of members this can put a burden on your server. (I have 54 members and it takes approx. 20 sec to send the emails.)  I will be modifing it to use BCC, that way the website server sends out less emails and your actual email server BCC's the members.  This will take me a few days, as Mark mentioned some email servers limit the amout of BCC's so it will need to take that into consideration.


[email protected]

MaineOne
Asp.Net User
Re: How to show the value of a Checkbox in a control6/5/2006 7:41:17 PM

0/0

Hi lex,

I just threw together a page that allows members to add or remove themselves from the mailing list

It uses a role to accomplish it, this makes it easy to implement.

Just add a role named EmailList

The Label and button on the aspx page can then be placed in your memberinfo page and the vb can be moved into the script and it will work.

I will post it on my site shortly, any questions email me.


[email protected]

lexy
Asp.Net User
Re: How to show the value of a Checkbox in a control6/5/2006 8:11:07 PM

0/0

Hi Frank,

Great, I think that is exactly what I am looking for.

Lex

 


I use VB
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Using Microsoft Outlook 2000 Authors: Gordon Padwick, Helen Bell Feddema, Pages: 1452, Published: 1999
Mastering Microsoft VBA Authors: Guy Hart-Davis, Pages: 707, Published: 2005
Excel VBA Macro Programming Authors: Richard Shepherd, Pages: 320, Published: 2004
Access 2003 Bible Authors: Cary N. Prague, Michael R. Irwin, Jennifer Reardon, Pages: 1464, Published: 2003
Oracle Application Server 10g Web Development: Build and Deploy Web-Based Applications in the Oracle Environment Authors: Chris Ostrowski, Bradley D. Brown, Pages: 747, Published: 2004
Excel Scientific and Engineering Cookbook Authors: David M. Bourg, Pages: 424, Published: 2006
Professional C# 2005 Authors: Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Allen Jones, Pages: 1540, Published: 2006
Professional C# 2008 Authors: Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Pages: 1782, Published: 2008
Creating Web Pages All-in-One Desk Reference For Dummies Authors: Richard Wagner, Richard Mansfield, Emily A Vander Veer, Pages: 672, Published: 2007
Programming .NET Windows Applications Authors: Jesse Liberty, Dan Hurwitz, Pages: 1228, Published: 2004

Web:
Using the Microsoft Office CheckBox Control Demonstrates how to use the Microsoft Office CheckBox ActiveX control in an HTML Application. ... Obviously it’s easy to read the value of a check box, ... value ? You bet you can, and we’ll show you an example of that in just a minute. ...
Numbers 1.0 Help (iWork '08): Using a Checkbox and Other Control ... Using a Checkbox and Other Control Formats. You can add a checkbox, slider, stepper, or pop-up menu to a cell:. A checkbox is for cells whose value ...
Setting up a field to display a pop-up menu, checkbox set, or ... (If you define a value list via the Field/Control Setup dialog box, ... a field with a checkbox allows users to enter more than one value for a field. ...
.NET - Windows Forms 2.0 – CheckBox Control Recipes Sep 3, 2008 ... To get the value of a two-state CheckBox control , use the ... Show(String. Format("No of Checked CheckBoxes are {0}", CountCheckBox(this). ...
checkbox value if...then... else... Resources | TechRepublic I've also found that the value attribute of a checkbox is. ... Given this, we have a CheckBox control with an ID of chkYN and a SQL Table tblTest that. ...
choosing to display or not to display a checkbox in repeater control. repeater control bound to a database table. Based on the value of database table I want to either show the checkbox for a row or not to show ...
Check Box (Control) A check box is a control for displaying a value choice that has two clearly ... Show it as set if all of the selected elements have that property turned on. ...
Understanding the checkbox component to display non boolean value The checkbox component has two attributes selected and selectedValue. When used as a boolean control the selectedValue attribute is not used. The value of ...
ActiveWidgets • How to put value for each check box ???? Mar 21, 2006 ... Checkbox = Active.System.Control.subclass(); My.Templates. .... My main page only show the latest value of grid (all of check box) ...
display checkbox value from MS access to a textbox in visual basic ... Jan 8, 2008 ... display checkbox value from MS access to a textbox in visual .... set this at design time in the Caption property of the control If rsCust! ...




Search This Site:










messagebox

core forums reliability

how to store and retrieve images and values from a resouces dll?

can’t find tabstrip control in vs 2005

select boxes

how to develop out custom roleprovider

server.transfer another frame?

doctype making/breaking full height table

stealing an authentification ticket

regarding installation!

runtime error, expected ';'

moduleloadexception on every module

3.0.10 usersonline module

asp.net configuration manager add user error

dotnetnuke 3.2/4.0 core changes and oracle data access

skmmenu

error: while using "md5" and "sha1" algorithms.

dnn jungle error on page load

folder like navigation

single blog posts not showing up

infragistics issue and fix.

global theme working in xp but not working in windows server 2003

alternate for the aspkey sub menu

filenotfound logconfigtemplate.xml.resources

draging part, similar to google gadgets?

sql database question

moving php-nuke site to dnn

self-post asp.net page from a html form

identity impersonation and sp4 for windows 2000

an error i don't understand

 
All Times Are GMT