[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Anand

1/17/2003 7:24:00 AM

Hi:

I am doing mobile application. I am having problem in asp:literal control.

<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="mms.aspx.vb"
Inherits="Mobile.mms" %>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/Mobile/Page...
<body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm...
<mobile:Form id="Form1" runat="server" Title="Home">
<mobile:Panel id="Panel1" runat="server" Visible="True">
<mobile:DeviceSpecific id="Devicespecific1" runat="server">
<Choice Filter="isHTML32">
<ContentTemplate>
<asp:Literal ID="htmlcode" Runat="Server"></asp:Literal>
</ContentTemplate>
</Choice>
</mobile:DeviceSpecific>
</mobile:Panel>
</mobile:Form>
</body>

I am assigning the text for asp:literal control in code behind. Its not
working. Please suggest me how to get the output. In your case its working.
Please reply me.

Regards,
S.Anandhan




4 Answers

(dip)

1/17/2003 9:37:00 PM

0

Try the following :

...
Control c = Panel1.Controls[0];
System.Web.UI.WebControls.Literal myLiteral=
((System.Web.UI.WebControls.Literal)c.FindControl
("htmlcode"));

if (myLiteral!= null)
{
myLiteral.text = "New Text Value";
}
...

>-----Original Message-----
>Hi:
>
>I am doing mobile application. I am having problem in
asp:literal control.
>
><%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
>Assembly="System.Web.Mobile, Version=1.0.3300.0,
Culture=neutral,
>PublicKeyToken=b03f5f7f11d50a3a" %>
><%@ Page Language="vb" AutoEventWireup="false"
Codebehind="mms.aspx.vb"
>Inherits="Mobile.mms" %>
><meta name="GENERATOR" content="Microsoft Visual
Studio.NET 7.0">
><meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
><meta name="vs_targetSchema"
>content="http://schemas.microsoft.com/Mobile/Page...
><body
Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm...
> <mobile:Form id="Form1" runat="server" Title="Home">
> <mobile:Panel id="Panel1" runat="server"
Visible="True">
> <mobile:DeviceSpecific id="Devicespecific1"
runat="server">
> <Choice Filter="isHTML32">
> <ContentTemplate>
> <asp:Literal ID="htmlcode"
Runat="Server"></asp:Literal>
> </ContentTemplate>
> </Choice>
> </mobile:DeviceSpecific>
> </mobile:Panel>
> </mobile:Form>
></body>
>
>I am assigning the text for asp:literal control in code
behind. Its not
>working. Please suggest me how to get the output. In your
case its working.
>Please reply me.
>
>Regards,
>S.Anandhan
>
>
>
>
>.
>

(dip)

1/17/2003 10:49:00 PM

0

Don't know why my previous reply to your post does not
appear... Here it is again:

...
Control c = Panel1.Controls[0];

System.Web.UI.WebControls.Literal myLiteral=
((System.Web.UI.WebControls.Literal)c.FindControl
("htmlcode"));

if (myLiteral != null)
{
myLiteral.text = "New Literal Value";
}
...

>-----Original Message-----
>Hi:
>
>I am doing mobile application. I am having problem in
asp:literal control.
>
><%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
>Assembly="System.Web.Mobile, Version=1.0.3300.0,
Culture=neutral,
>PublicKeyToken=b03f5f7f11d50a3a" %>
><%@ Page Language="vb" AutoEventWireup="false"
Codebehind="mms.aspx.vb"
>Inherits="Mobile.mms" %>
><meta name="GENERATOR" content="Microsoft Visual
Studio.NET 7.0">
><meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
><meta name="vs_targetSchema"
>content="http://schemas.microsoft.com/Mobile/Page...
><body
Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm...
> <mobile:Form id="Form1" runat="server" Title="Home">
> <mobile:Panel id="Panel1" runat="server"
Visible="True">
> <mobile:DeviceSpecific id="Devicespecific1"
runat="server">
> <Choice Filter="isHTML32">
> <ContentTemplate>
> <asp:Literal ID="htmlcode"
Runat="Server"></asp:Literal>
> </ContentTemplate>
> </Choice>
> </mobile:DeviceSpecific>
> </mobile:Panel>
> </mobile:Form>
></body>
>
>I am assigning the text for asp:literal control in code
behind. Its not
>working. Please suggest me how to get the output. In your
case its working.
>Please reply me.
>
>Regards,
>S.Anandhan
>
>
>
>
>.
>

Anand

1/18/2003 5:45:00 AM

0

Hi Dip,

I am using vb language in code behind. Could you please send me in vb.net
format.

"dip" <bom2180@yahoo.com> wrote in message
news:7f9e01c2be68$5251bd40$cef82ecf@TK2MSFTNGXA08...
> Try the following :
>
> ...
> Control c = Panel1.Controls[0];
> System.Web.UI.WebControls.Literal myLiteral=
> ((System.Web.UI.WebControls.Literal)c.FindControl
> ("htmlcode"));
>
> if (myLiteral!= null)
> {
> myLiteral.text = "New Text Value";
> }
> ...
>
> >-----Original Message-----
> >Hi:
> >
> >I am doing mobile application. I am having problem in
> asp:literal control.
> >
> ><%@ Register TagPrefix="mobile"
> Namespace="System.Web.UI.MobileControls"
> >Assembly="System.Web.Mobile, Version=1.0.3300.0,
> Culture=neutral,
> >PublicKeyToken=b03f5f7f11d50a3a" %>
> ><%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="mms.aspx.vb"
> >Inherits="Mobile.mms" %>
> ><meta name="GENERATOR" content="Microsoft Visual
> Studio.NET 7.0">
> ><meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
> ><meta name="vs_targetSchema"
> >content="http://schemas.microsoft.com/Mobile/Page...
> ><body
> Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm...
> > <mobile:Form id="Form1" runat="server" Title="Home">
> > <mobile:Panel id="Panel1" runat="server"
> Visible="True">
> > <mobile:DeviceSpecific id="Devicespecific1"
> runat="server">
> > <Choice Filter="isHTML32">
> > <ContentTemplate>
> > <asp:Literal ID="htmlcode"
> Runat="Server"></asp:Literal>
> > </ContentTemplate>
> > </Choice>
> > </mobile:DeviceSpecific>
> > </mobile:Panel>
> > </mobile:Form>
> ></body>
> >
> >I am assigning the text for asp:literal control in code
> behind. Its not
> >working. Please suggest me how to get the output. In your
> case its working.
> >Please reply me.
> >
> >Regards,
> >S.Anandhan
> >
> >
> >
> >
> >.
> >


(dip)

1/20/2003 8:07:00 PM

0

hi,
A similar example is available at MSDN:

http://msdn.microsoft.com/library/default.asp?url...
en-us/mwsdk/html/mwconTemplateSetsandTemplatedControls.asp

You will need to modify for Literal control.

- Dip
>-----Original Message-----
>Hi:
>
>I am doing mobile application. I am having problem in
asp:literal control.
>
><%@ Register TagPrefix="mobile"
Namespace="System.Web.UI.MobileControls"
>Assembly="System.Web.Mobile, Version=1.0.3300.0,
Culture=neutral,
>PublicKeyToken=b03f5f7f11d50a3a" %>
><%@ Page Language="vb" AutoEventWireup="false"
Codebehind="mms.aspx.vb"
>Inherits="Mobile.mms" %>
><meta name="GENERATOR" content="Microsoft Visual
Studio.NET 7.0">
><meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
><meta name="vs_targetSchema"
>content="http://schemas.microsoft.com/Mobile/Page...
><body
Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm...
> <mobile:Form id="Form1" runat="server" Title="Home">
> <mobile:Panel id="Panel1" runat="server"
Visible="True">
> <mobile:DeviceSpecific id="Devicespecific1"
runat="server">
> <Choice Filter="isHTML32">
> <ContentTemplate>
> <asp:Literal ID="htmlcode"
Runat="Server"></asp:Literal>
> </ContentTemplate>
> </Choice>
> </mobile:DeviceSpecific>
> </mobile:Panel>
> </mobile:Form>
></body>
>
>I am assigning the text for asp:literal control in code
behind. Its not
>working. Please suggest me how to get the output. In your
case its working.
>Please reply me.
>
>Regards,
>S.Anandhan
>
>
>
>
>.
>