PDA

View Full Version : [CLOSED] Text value of TextField object



Mario
Nov 13, 2014, 6:38 PM
Hi,

I have a problem very very strange...

I need to read the Text value of TextField Object and show it in the Message Box.

WebForm1.aspx


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="B2B.WEB.WebForm1" %>

<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>

<ext:ResourceManager runat="server" />

<ext:Panel ID="PanelTest" runat="server" Width="500" Border="true">
<Items>
<ext:TextField ID="TextFieldCode" runat="server" FieldLabel="Code:" />
</Items>
<Buttons>
<ext:Button ID="ButtonOK" runat="server" Text="OK" Icon="Accept">
<DirectEvents>
<Click OnEvent ="ButtonOK_Click" />
</DirectEvents>
</ext:Button>
</Buttons>
</ext:Panel>

</body>
</html>


WebForm1.aspx.vb


Public Class WebForm1
Inherits System.Web.UI.Page

Protected Sub ButtonOK_Click(ByVal sender As Object, ByVal e As Ext.Net.DirectEventArgs)
Dim Code As String = TextFieldCode.Text
Ext.Net.X.Msg.Show(New Ext.Net.MessageBoxConfig With {.Icon = Ext.Net.MessageBox.Icon.WARNING, .Title = "", .Message = Code, .Buttons = Ext.Net.MessageBox.Button.OK})
End Sub

End Class


If I cilck on the button appear a empty MessageBOX....
The Text Value is blank !!

Am I forgetting something?

Tnx

geoffrey.mcgill
Nov 13, 2014, 7:31 PM
You are missing a <form runat="server">.

Because you have no <form> on your page, no fields are submitted.

Hope this helps.

Mario
Nov 13, 2014, 7:59 PM
Thanks geoffrey.mcgill...

It's work!

It 'really got the time to go to sleep ...
I'm working more than 12 hours :(