Ok, apparently Im spending entirely too much time on .NET. BUT, Im at the point where I have my dynamic textboxes appearing as they should, and as Derek warned me about, I now am attempting to pull data from the .text properties of the textboxes. When I attempt to iterate through the placeholder containing these textboxes, I cant "use" the text property...in other words:
======================================
Dim ctrl as Control
For Each ctrl In PlaceHolder1.Controls
If TypeOf ctrl Is TextBox Then
If ctrl.ID = "txtParams" & j.ToString Then
Return (
ctrl.text)
End If
End If
Next
I dont have access to the .text property of the CTRL variable Ive dimensioned. I assume this is because its seeing this as a control and not a webcontrol? But, if I redimension it as a webcontrol, then I receive a cast error like the following:
=======================================
Server Error in /WebAppCrystalRevisit Application.
--------------------------------------------------------------------------------
Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Specified cast is not valid.
Source Error:
Line 114: Public ReadOnly Property GetParam(ByVal j As
Integer) As String
Line 115: Get
Line 116: For Each ctrl In PlaceHolder1.Controls
Line 117: If TypeOf ctrl Is TextBox Then
Line 118: If ctrl.ID = "txtParams" & j.ToString Then Return (ctrl.ID.ToString)
Source File: c:\inetpub\wwwroot\WebAppCrystalRevisit\frmParameters.aspx.vb Line: 116
=======================================
Anyone have
any comments about this? Does anyone agree with Derek and can offer an alternate means by which I may accomplish the goal of this cwazy exercise? Thanks in advance.
![Cool :cool: :cool:](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f60e.png)