Click here to Skip to main content
16,004,977 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionNo source available for current location Pin
vlehotay1-Dec-09 15:53
vlehotay1-Dec-09 15:53 
AnswerRe: No source available for current location Pin
Abhijit Jana1-Dec-09 17:51
professionalAbhijit Jana1-Dec-09 17:51 
Questionemail Pin
chandra2341-Dec-09 14:32
chandra2341-Dec-09 14:32 
AnswerRe: email Pin
Kannan Ar1-Dec-09 15:35
professionalKannan Ar1-Dec-09 15:35 
AnswerRe: email Pin
Abhijit Jana1-Dec-09 17:56
professionalAbhijit Jana1-Dec-09 17:56 
QuestionShared assembly Pin
Hemant Thaker1-Dec-09 9:24
Hemant Thaker1-Dec-09 9:24 
AnswerRe: Shared assembly Pin
Abhishek Sur1-Dec-09 11:07
professionalAbhishek Sur1-Dec-09 11:07 
QuestionProblem getting info from checkbox list Pin
Aptiva Dave1-Dec-09 7:47
Aptiva Dave1-Dec-09 7:47 
I'm building a web app and on one page I am using a check box list control for a group of selections. Before I submit my info to the database, I am sanitizing it and then placing it into session variables so the user can look over the info they typed in before putting it into the database.

The checkbox list in question is for a question asking about what type of work the user is looking for (Full-time, Part-time, or Temporary Work). What I want to put into the database is all of the user's selections, each separated by a comma. Here is the code I was using to pull that information from the checkbox list:
Dim w As Integer = 0
                    Dim chkbxWork As CheckBoxList = New CheckBoxList
                    chkbxWork = CType(Form.FindControl("cblWork"), CheckBoxList)
                    Dim sbWork As StringBuilder = New StringBuilder()
                    For w = 0 To chkbxWork.Items.Count - 1
                        If chkbxWork.Items(w).Selected Then
                            sbWork.Append(chkbxWork.Items(w).Value & ",")
                        End If
                    Next
                    'remove last comma
                    Dim IVWork As String = Left(sbWork.ToString(), Len(sbWork.ToString()) - 1)
                    Session("WorkType") = Server.HtmlEncode(IVWork)


This is all inside of a Try/Catch block, so naturally I keep getting an error when the for loop runs saying that there is a null object. What am I doing wrong?
AnswerRe: Problem getting info from checkbox list Pin
Abhishek Sur1-Dec-09 11:11
professionalAbhishek Sur1-Dec-09 11:11 
GeneralRe: Problem getting info from checkbox list Pin
Aptiva Dave2-Dec-09 8:44
Aptiva Dave2-Dec-09 8:44 
GeneralRe: Problem getting info from checkbox list Pin
Abhishek Sur2-Dec-09 20:13
professionalAbhishek Sur2-Dec-09 20:13 
QuestionUser Authentication for .aspx pages Pin
GauravKP1-Dec-09 6:08
professionalGauravKP1-Dec-09 6:08 
AnswerRe: User Authentication for .aspx pages Pin
Petr Pechovic1-Dec-09 6:18
professionalPetr Pechovic1-Dec-09 6:18 
AnswerRe: User Authentication for .aspx pages Pin
Gaurav Dudeja India1-Dec-09 17:23
Gaurav Dudeja India1-Dec-09 17:23 
QuestionHow to upload N-Tier architecture Project onto web server? Pin
Krishhhhhhhhhhhhhh1-Dec-09 3:50
Krishhhhhhhhhhhhhh1-Dec-09 3:50 
AnswerRe: How to upload N-Tier architecture Project onto web server? Pin
Vimalsoft(Pty) Ltd1-Dec-09 3:53
professionalVimalsoft(Pty) Ltd1-Dec-09 3:53 
GeneralRe: How to upload N-Tier architecture Project onto web server? Pin
Krishhhhhhhhhhhhhh1-Dec-09 4:09
Krishhhhhhhhhhhhhh1-Dec-09 4:09 
GeneralRe: How to upload N-Tier architecture Project onto web server? Pin
Abhishek Sur1-Dec-09 4:28
professionalAbhishek Sur1-Dec-09 4:28 
GeneralRe: How to upload N-Tier architecture Project onto web server? Pin
Vimalsoft(Pty) Ltd1-Dec-09 19:30
professionalVimalsoft(Pty) Ltd1-Dec-09 19:30 
QuestionHow to Merge two data tables in a dataset with common Column Pin
kakani santosh kumar1-Dec-09 2:48
kakani santosh kumar1-Dec-09 2:48 
AnswerRe: How to Merge two data tables in a dataset with common Column Pin
Anurag Gandhi1-Dec-09 3:00
professionalAnurag Gandhi1-Dec-09 3:00 
QuestionBC30201: Expression expected. [modified] Pin
alaminfad1-Dec-09 2:03
alaminfad1-Dec-09 2:03 
AnswerRe: BC30201: Expression expected. Pin
Dinesh Mani1-Dec-09 2:14
Dinesh Mani1-Dec-09 2:14 
GeneralRe: BC30201: Expression expected. Pin
alaminfad1-Dec-09 18:24
alaminfad1-Dec-09 18:24 
GeneralRe: BC30201: Expression expected. Pin
Dinesh Mani1-Dec-09 18:41
Dinesh Mani1-Dec-09 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.