Click here to Skip to main content
15,905,504 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionKind of new to Web Development with ASP.Net and was wondering... Pin
Stuart Jeffery13-Jul-09 4:19
Stuart Jeffery13-Jul-09 4:19 
AnswerRe: Kind of new to Web Development with ASP.Net and was wondering... Pin
Manas Bhardwaj13-Jul-09 4:31
professionalManas Bhardwaj13-Jul-09 4:31 
AnswerRe: Kind of new to Web Development with ASP.Net and was wondering... Pin
PJWindsor13-Jul-09 4:53
PJWindsor13-Jul-09 4:53 
Questionjavascript with usercontrol Pin
Mohammed Elkholy13-Jul-09 2:49
Mohammed Elkholy13-Jul-09 2:49 
AnswerRe: javascript with usercontrol Pin
Not Active13-Jul-09 4:12
mentorNot Active13-Jul-09 4:12 
QuestionAsk for promotion when Window has to be close Pin
ksss_maheshece13-Jul-09 1:58
ksss_maheshece13-Jul-09 1:58 
AnswerRe: Ask for promotion when Window has to be close Pin
vaghelabhavesh13-Jul-09 2:19
vaghelabhavesh13-Jul-09 2:19 
Questionhow I can get id's of checked checkboxes, which are runtime added? Pin
kripa2113-Jul-09 1:58
kripa2113-Jul-09 1:58 
Greetings,
I have loaded checkboxes in asp table control at form load evevt; from database.
Now I want to get all checked values in 1 array.
I used for each loop & stored control in 1 checkbox object & if that is checked then add value in array.
my code is as follows

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
fillControls()
End If
End Sub

in fillControls(), I took datatable for Id & name. & added checkboxes as

Dim objTr As New TableRow
For intCnt = 0 To objDataTable.Rows.Count - 1
If intCnt Mod 4 = 0 Then
objTr = New TableRow
table1.Rows.Add(objTr)
End If
Dim objTd As New TableCell
Dim objChk As New CheckBox
objTr.Cells.Add(objTd)
objTd.Controls.Add(objChk)
objChk.Attributes.Add("runat", "server")
objChk.ID = objDataTable.Rows(intCnt).Item(0)
objChk.Text =objDataTable.Rows(intCnt).Item(1)
Next

And when user submit the form< I want to get all id's of checkboxes in 1 array
for that I wrote,

Dim arrSubMnu() As Integer = New Integer() {}
For Each ctl As Control In table1.Controls
If TypeOf ctl Is CheckBox Then
If CType(ctl, CheckBox).Checked = True Then
ReDim Preserve arrIds(arrIds.Length)
arrIds(arrIds.Length) = ctl.ID
End If
End If
Next ctl


I couldn't find out where is error.I am not getting anything in array
Please Help Me to solve this problem
AnswerRe: how I can get id's of checked checkboxes, which are runtime added? Pin
PJWindsor13-Jul-09 5:03
PJWindsor13-Jul-09 5:03 
AnswerRe: how I can get id's of checked checkboxes, which are runtime added? Pin
Kannan Ar13-Jul-09 5:19
professionalKannan Ar13-Jul-09 5:19 
AnswerRe: how I can get id's of checked checkboxes, which are runtime added? Pin
kripa2125-Nov-09 23:19
kripa2125-Nov-09 23:19 
QuestionASP.NEt with ORACLE Pin
sandhya1413-Jul-09 1:42
sandhya1413-Jul-09 1:42 
AnswerRe: ASP.NEt with ORACLE Pin
Blue_Boy13-Jul-09 1:43
Blue_Boy13-Jul-09 1:43 
GeneralRe: ASP.NEt with ORACLE Pin
sandhya1413-Jul-09 1:51
sandhya1413-Jul-09 1:51 
AnswerRe: ASP.NEt with ORACLE Pin
Brij13-Jul-09 1:44
mentorBrij13-Jul-09 1:44 
AnswerCP Member Ignore : Cross Post Pin
Abhijit Jana13-Jul-09 1:44
professionalAbhijit Jana13-Jul-09 1:44 
QuestionAdd arraylist to pre-checked checkboxes Pin
simplee13-Jul-09 1:07
simplee13-Jul-09 1:07 
QuestionHow to filter Office Documents in Indexing Services. Pin
alisolution13-Jul-09 0:59
alisolution13-Jul-09 0:59 
AnswerRe: How to filter Office Documents in Indexing Services. Pin
vaghelabhavesh13-Jul-09 2:32
vaghelabhavesh13-Jul-09 2:32 
Questionhow to apply themes to the webparts Pin
lakshmichawala13-Jul-09 0:46
lakshmichawala13-Jul-09 0:46 
AnswerRe: how to apply themes to the webparts Pin
Brij13-Jul-09 1:42
mentorBrij13-Jul-09 1:42 
AnswerRe: how to apply themes to the webparts Pin
r a m e s h13-Jul-09 5:22
r a m e s h13-Jul-09 5:22 
Questionsending email with attachment(which lies in a table as an image file ) Pin
shankbond13-Jul-09 0:08
shankbond13-Jul-09 0:08 
AnswerRe: sending email with attachment(which lies in a table as an image file ) Pin
Blue_Boy13-Jul-09 0:11
Blue_Boy13-Jul-09 0:11 
AnswerRe: sending email with attachment(which lies in a table as an image file ) Pin
CrazyCoder2613-Jul-09 0:24
CrazyCoder2613-Jul-09 0:24 

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.