Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 21st, 2011, 12:47 PM
Registered User
 
Join Date: Jan 2011
Posts: 9
Thanks: 6
Thanked 0 Times in 0 Posts
Default CheckBoxList

Hi
i want when no item selected after Submit show this message "Nothing Selected" what should i do ?
Thanks
Code:
  Protected Sub Btnsub_Click(ByVal sender As Object, ByVal e As 
      lblresult.Text = "You Chose:<br/>"
      Dim Lstitems As ListItem
      For Each Lstitems In CheckBoxList1.Items
      If Lstitems.Selected Then
      lblresult.Text &= "<br/>" & Lstitems.Text & "<br/>"
        End If
      Next
      End Sub
http://hotfile.com/dl/106538473/07d5...itled.png.html
Reply With Quote
  #2 (permalink)  
Old March 14th, 2011, 06:09 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

put a counter in your loop. If 0 items are selected, show your message
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CheckboxList onselectindexchanged rlb ASP.NET 2.0 Professional 1 August 13th, 2008 12:56 PM
Checkboxlist epkgupta Visual Studio 2005 0 March 11th, 2008 05:31 AM
CheckBoxList stu9820 ASP.NET 1.0 and 1.1 Basics 10 May 25th, 2006 08:15 PM
Checkboxlist problem sansircar ASP.NET 1.0 and 1.1 Professional 1 March 12th, 2006 01:36 AM
CheckBoxList eddiema VS.NET 2002/2003 1 April 9th, 2004 09:49 AM



All times are GMT -4. The time now is 10:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.