J
jobs
This code was working, but then stopped working. I don't think I
completely understand it.
I pass it a formview name and it would loop through checking the
value of textboxes.
problem is now as i debug it, it's telling me there are only a count
of 3 controls in that for loop. and they have clientid values like:
ctl00_Content1_FormMaint_ctl03
My thinking is that I'm at the wrong level, or maybe because I changed
the table organizing textboxes inside the formview that things are not
making sense.
suspect and confusing is this code which was once working..
whichformview.Controls(0).Controls(1),
What's weird is I have some 20 asp textboxes in that formview and it's
report tc.controls.count of only 3, the first being a literal which is
right, but the second coming back as type
System.Web.UI.HtmlControls.HtmlGenericControl which seems wrong.
Incidently, the forth control is a dropdownlist which I would have
just skipped over.
I've been using this same function in countless other aps. I did not
touch, but something in my asp.net is apparently through it off.
Function FormviewErrors(ByVal whichformview As FormView) As String
Dim Errors As String = Nothing
Dim fr As FormViewRow =
(CType(whichformview.Controls(0).Controls(1), FormViewRow))
Dim tc As TableCell = fr.Cells(0)
For i As Integer = tc.Controls.Count To 1 Step -1
Dim c As Control = tc.Controls(i - 1)
Dim x As String = c.ClientID.ToString
If c.GetType().ToString =
"System.Web.UI.WebControls.TextBox" Then
Thanks for any help or information.
completely understand it.
I pass it a formview name and it would loop through checking the
value of textboxes.
problem is now as i debug it, it's telling me there are only a count
of 3 controls in that for loop. and they have clientid values like:
ctl00_Content1_FormMaint_ctl03
My thinking is that I'm at the wrong level, or maybe because I changed
the table organizing textboxes inside the formview that things are not
making sense.
suspect and confusing is this code which was once working..
whichformview.Controls(0).Controls(1),
What's weird is I have some 20 asp textboxes in that formview and it's
report tc.controls.count of only 3, the first being a literal which is
right, but the second coming back as type
System.Web.UI.HtmlControls.HtmlGenericControl which seems wrong.
Incidently, the forth control is a dropdownlist which I would have
just skipped over.
I've been using this same function in countless other aps. I did not
touch, but something in my asp.net is apparently through it off.
Function FormviewErrors(ByVal whichformview As FormView) As String
Dim Errors As String = Nothing
Dim fr As FormViewRow =
(CType(whichformview.Controls(0).Controls(1), FormViewRow))
Dim tc As TableCell = fr.Cells(0)
For i As Integer = tc.Controls.Count To 1 Step -1
Dim c As Control = tc.Controls(i - 1)
Dim x As String = c.ClientID.ToString
If c.GetType().ToString =
"System.Web.UI.WebControls.TextBox" Then
Thanks for any help or information.