Click here to Skip to main content
15,791,229 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how to use login Pin
eyeseetee27-Apr-08 22:37
eyeseetee27-Apr-08 22:37 
GeneralPROBLEM : Ttwice the dropdown function calling Pin
Karan_TN27-Apr-08 21:15
Karan_TN27-Apr-08 21:15 
GeneralRe: PROBLEM : Ttwice the dropdown function calling Pin
Christian Graus27-Apr-08 22:05
protectorChristian Graus27-Apr-08 22:05 
GeneralRe: PROBLEM : Ttwice the dropdown function calling Pin
trish_28-Apr-08 2:17
trish_28-Apr-08 2:17 
QuestionI want a gridview to edit a single column in edit mode Pin
G Nathan27-Apr-08 21:02
G Nathan27-Apr-08 21:02 
GeneralRe: I want a gridview to edit a single column in edit mode Pin
Christian Graus27-Apr-08 22:06
protectorChristian Graus27-Apr-08 22:06 
GeneralRe: I want a gridview to edit a single column in edit mode Pin
G Nathan28-Apr-08 2:27
G Nathan28-Apr-08 2:27 
QuestionHow to fine the length of array if it dosenot contain any value. [modified] (Solved) Pin
rahul.net1127-Apr-08 20:49
rahul.net1127-Apr-08 20:49 
Thanks I have solved the Problem.

Hello all,
In my application i have defined a array and dynamically i have created checkbox. Now i am finding the how meny checkbox user have checked by finding the length of array by using following code.

[code]
Dim qidArr() As String
Dim chkQues As CheckBox
Dim i As Integer
Dim sqid, lastid As String


For i = 0 To tableQuestion.Rows.Count - 1
chkQues = CType(tableQuestion.FindControl("chk" & i), CheckBox)
If chkQues.Checked = True Then
lid = CType(tableQuestion.FindControl("lblQid" & i), Label)
If ViewState("qid") <> Nothing Then
lastid = ViewState("qid")
sqid = lastid & "," & lid.Text
qidArr = sqid.Split(",")
Else
sqid = lid.Text
qidArr = sqid.Split(",")
End If
ViewState("qid") = sqid
ViewState("total") = qidArr
End If


Next

If qidArr.Length = 0 Then
Return 0
'ElseIf qidArr.Length = 0 Then
ElseIf qidArr.Length > 3 Then
Return 1
ElseIf qidArr.Length > 0 And qidArr.Length < 4 Then
Return 2
End If
[/code]

but the problem is that if user dosenot check any checkbox the it goes into exception [code]qidArr.Length = 0 [/code] after this statement.
Can anybody tell me how can i check length of array=0.


Thanks

People Laugh on me Because i am Different but i Laugh on them
Because they all are same.

modified on Monday, April 28, 2008 1:57 AM

AnswerRe: How to fine the length of array if it dosenot contain any value. [modified] (Solved) Pin
Christian Graus27-Apr-08 20:57
protectorChristian Graus27-Apr-08 20:57 
Generalpage.loadControl(string virtualpath) Pin
ptvce27-Apr-08 20:36
ptvce27-Apr-08 20:36 
GeneralRe: page.loadControl(string virtualpath) Pin
Moghan27-Apr-08 20:52
Moghan27-Apr-08 20:52 
GeneralRe: page.loadControl(string virtualpath) Pin
ptvce27-Apr-08 21:36
ptvce27-Apr-08 21:36 
GeneralDate time Conversion- Help! Pin
Moghan27-Apr-08 20:33
Moghan27-Apr-08 20:33 
GeneralRe: Date time Conversion- Help! Pin
Christian Graus27-Apr-08 20:47
protectorChristian Graus27-Apr-08 20:47 
GeneralImplement CAPTCHA on LogInControl Pin
AlexeiXX327-Apr-08 20:30
AlexeiXX327-Apr-08 20:30 
Questionhow to handle javascript in the when drop down control is in update panel Pin
lakshmichawala27-Apr-08 19:34
lakshmichawala27-Apr-08 19:34 
AnswerRe: how to handle javascript in the when drop down control is in update panel Pin
AlexeiXX327-Apr-08 19:51
AlexeiXX327-Apr-08 19:51 
GeneralRe: how to handle javascript in the when drop down control is in update panel Pin
lakshmichawala27-Apr-08 20:08
lakshmichawala27-Apr-08 20:08 
AnswerRe: how to handle javascript in the when drop down control is in update panel Pin
Dotnetkanna28-Apr-08 0:55
Dotnetkanna28-Apr-08 0:55 
QuestionHow to refresh data on Web User Control after a pop up is closed ? Pin
pvphuc27-Apr-08 19:25
pvphuc27-Apr-08 19:25 
GeneralPassing the value from parent to child Pin
Rena7727-Apr-08 15:38
Rena7727-Apr-08 15:38 
GeneralRe: Passing the value from parent to child Pin
Moghan27-Apr-08 20:46
Moghan27-Apr-08 20:46 
GeneralRe: Passing the value from parent to child Pin
Rena7728-Apr-08 3:22
Rena7728-Apr-08 3:22 
GeneralRe: Passing the value from parent to child Pin
Moghan29-Apr-08 20:31
Moghan29-Apr-08 20:31 
GeneralRe: Passing the value from parent to child Pin
Rena7730-Apr-08 3:54
Rena7730-Apr-08 3:54 

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.