Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multi-Line textbox in VB

1 view
Skip to first unread message

AtlMobile

unread,
Jun 24, 2003, 9:11:04 AM6/24/03
to
All, I am trying to create a multi-line text box in a mobile web form
then get the input to ultimatley store it in SQL using VB.net. I've
found the way to create the multi-line text box, but I've been unable
to retrieve the data with VB.net.

Your help would be most appreciated!

<mobile:form id="Form1" runat="server">
<mobile:Panel id="Panel1" runat="server">
<mobile:DeviceSpecific id="DeviceSpecific1" runat="server">
<Choice Filter="isPocketIE">
<ContentTemplate>
<asp:TextBox id="textBox1" runat="server" TextMode="MultiLine"
Rows="10" />
</ContentTemplate>
</Choice>
</mobile:DeviceSpecific>
</mobile:Panel>
<mobile:Command id="Command3" runat="server">Test</mobile:Command>
<mobile:Label id="Label2" runat="server">Label</mobile:Label>
</mobile:form>

'Button Code
Private Sub Command3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Command3.Click
Try
Dim txtQty As System.Web.UI.MobileControls.TextBox =
CType(Panel1.Controls(0).FindControl("Textbox1"),
System.Web.UI.MobileControls.TextBox)
If txtQty Is Nothing Then
Label2.Text = "nothing found"
End If
Catch ex As SystemException
Label2.Text = "error"
End Try
End Sub

AtlMobile

unread,
Jun 30, 2003, 2:28:53 PM6/30/03
to
Here's my solution:

Private Sub Command3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Command3.Click
Try

Dim strDestination As String =
CType(Panel1.Controls(0).FindControl("textBox1"),
System.Web.UI.WebControls.TextBox).Text
If strDestination Is Nothing Then
Label2.Text = "nothing found"
Else
Label2.Text = strDestination


End If
Catch ex As SystemException
Label2.Text = "error"
End Try
End Sub


sea...@eagletc.com (AtlMobile) wrote in message news:<cfce8db.03062...@posting.google.com>...

0 new messages