Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.aspnet.mobile
How to Handle Events inside a Device Specific Mobile Panel Control
Ganesh babu
3/21/2002 9:26:00 AM
3 Answers
(Andres Sanabria)
3/25/2002 8:55:00 PM
0
Ganesh babu
3/28/2002 1:28:00 PM
0
Thanks !!!!!!!!!it worked Great.
Thanks for the Support.
>-----Original Message-----
>The way to access a control inside a panel is by
requesting the panel to
>find the control.
>
>See the resolution below:
>
>//Inside your code behind.
>protected void Click_Me(object sender, System.EventArgs e)
>{
> System.Web.UI.MobileControls.TextBox txt =
>(System.Web.UI.MobileControls.TextBox)
Panel1.Content.FindControl("txt_name")
>;
> txt.Text="Ganesh";
>}
>
><%-- In your aspx.. Check the onclick event in the
command control (this
>avoid the need to subscribe to the code behind on the
page load event--%>
> <mobile:Form Runat="server" ID="Form1">
> <mobile:Panel id="Panel1" Runat="server">
> <mobile:DeviceSpecific id="DeviceSpecific1"
runat="server">
> <CHOICE Filter="isHTML32"
>Xmlns="
http://schemas.microsoft.com/mobile/html32temp...
>
> <CONTENTTEMPLATE>
> <TABLE id="Table1" runat="server">
> <TR>
> <TD>
> <IMG src="img/economia/logo_sx_top.gif"
width="42">
> </TD>
> </TR>
> <TR>
> <TD>
> <mobile:TextBox id="txt_name"
>runat="server"></mobile:TextBox>
> <mobile:Command id="cmd_1"
runat="server"
>onclick="Click_Me"></mobile:Command>
> </TD>
> </TR>
> </TABLE>
> </CONTENTTEMPLATE>
> </CHOICE>
> </mobile:DeviceSpecific>
> </mobile:Panel>
> <mobile:Command id="Command1"
runat="server">Command</mobile:Command>
> </mobile:Form>
>
>I am attaching the files just in case that you need them
>
>
>AndresS
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>You assume all risk for your use. © 2002 Microsoft
Corporation. All rights
>reserved.
M.Howard
3/29/2002 7:02:00 PM
0
Or you could do this also, if you need to assign a value
let say to a textbox or a label control, you could in the
code behind add a reference to it if it's not allready
there like so : "Protected WithEvents myLabel As
System.Web.UI.MobileControls.Label" then in your code
you could say myLabel.text = "Hello"
>-----Original Message-----
>Thanks !!!!!!!!!it worked Great.
>Thanks for the Support.
>
>
>
>
>>-----Original Message-----
>>The way to access a control inside a panel is by
>requesting the panel to
>>find the control.
>>
>>See the resolution below:
>>
>>//Inside your code behind.
>>protected void Click_Me(object sender, System.EventArgs
e)
>>{
>> System.Web.UI.MobileControls.TextBox txt =
>>(System.Web.UI.MobileControls.TextBox)
>Panel1.Content.FindControl("txt_name")
>>;
>> txt.Text="Ganesh";
>>}
>>
>><%-- In your aspx.. Check the onclick event in the
>command control (this
>>avoid the need to subscribe to the code behind on the
>page load event--%>
>> <mobile:Form Runat="server" ID="Form1">
>> <mobile:Panel id="Panel1" Runat="server">
>> <mobile:DeviceSpecific id="DeviceSpecific1"
>runat="server">
>> <CHOICE Filter="isHTML32"
>>Xmlns="
http://schemas.microsoft.com/mobile/htm...
e"
>>
>> <CONTENTTEMPLATE>
>> <TABLE id="Table1" runat="server">
>> <TR>
>> <TD>
>> <IMG
src="img/economia/logo_sx_top.gif"
>width="42">
>> </TD>
>> </TR>
>> <TR>
>> <TD>
>> <mobile:TextBox id="txt_name"
>>runat="server"></mobile:TextBox>
>> <mobile:Command id="cmd_1"
>runat="server"
>>onclick="Click_Me"></mobile:Command>
>> </TD>
>> </TR>
>> </TABLE>
>> </CONTENTTEMPLATE>
>> </CHOICE>
>> </mobile:DeviceSpecific>
>> </mobile:Panel>
>> <mobile:Command id="Command1"
>runat="server">Command</mobile:Command>
>> </mobile:Form>
>>
>>I am attaching the files just in case that you need them
>>
>>
>>AndresS
>>
>>This posting is provided "AS IS" with no warranties,
and
>confers no rights.
>>You assume all risk for your use. © 2002 Microsoft
>Corporation. All rights
>>reserved.
>.
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
How to Handle Events inside a Device Specific Mobile Panel Control
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password