DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 20 Aug 2007 09:28:03 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    NEMA
          2    Eliyahu Goldin
                 3    Eliyahu Goldin
          4    NEMA
          5    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]


Setting Text of a button   
Hello everyone,

i have a problem while setting the button text recently

for my case, i would like to set the text of the button on the aspx
page, i have write the code like below

<asp:button id="btn_submit" text='<%# GetText("abc.xml","btn_text")
%>' >

where the GetText is a function which will retrieve a string in xml
The page can run but the text cannot be display on the button. i am
sure that the function is work as i have tried it on the code-behind
like: btn_submit.text = GetText("abc.xml","btn_text") , it work fine
with no problem but it dont work while i try it in the aspx page.

Did anyone try it before and please give me some hints. Thanks everyone
Date:Mon, 20 Aug 2007 09:28:03 -0700   Author:  

Re: Setting Text of a button   
<%# ... is a databinding expression. You need to call DataBind method to 
execute it.

-- 
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"NEMA"  wrote in message 
news:1187627283.861214.89540@z24g2000prh.googlegroups.com...

> Hello everyone,
>
> i have a problem while setting the button text recently
>
> for my case, i would like to set the text of the button on the aspx
> page, i have write the code like below
>
> <asp:button id="btn_submit" text='<%# GetText("abc.xml","btn_text")
> %>' >
>
> where the GetText is a function which will retrieve a string in xml
> The page can run but the text cannot be display on the button. i am
> sure that the function is work as i have tried it on the code-behind
> like: btn_submit.text = GetText("abc.xml","btn_text") , it work fine
> with no problem but it dont work while i try it in the aspx page.
>
> Did anyone try it before and please give me some hints. Thanks everyone
> 
Date:Mon, 20 Aug 2007 19:43:28 +0300   Author:  

Re: Setting Text of a button   
Thanks

So how can i execute that function
i have also try <%= GetText("abc.xml","btn_text") %> but it is not
work too

On 8 21 ,   12 43 , "Eliyahu Goldin"
 wrote:

> <%# ... is a databinding expression. You need to call DataBind method to
> execute it.
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net
>
> "NEMA"  wrote in message
>
> news:1187627283.861214.89540@z24g2000prh.googlegroups.com...
>
>
>
> > Hello everyone,
>
> > i have a problem while setting the button text recently
>
> > for my case, i would like to set the text of the button on the aspx
> > page, i have write the code like below
>
> > <asp:button id="btn_submit" text='<%# GetText("abc.xml","btn_text")
> > %>' >
>
> > where the GetText is a function which will retrieve a string in xml
> > The page can run but the text cannot be display on the button. i am
> > sure that the function is work as i have tried it on the code-behind
> > like: btn_submit.text = GetText("abc.xml","btn_text") , it work fine
> > with no problem but it dont work while i try it in the aspx page.
>
> > Did anyone try it before and please give me some hints. Thanks everyone-         -
>
> -         -
Date:Mon, 20 Aug 2007 10:26:23 -0700   Author:  

Re: Setting Text of a button   
Perhaps you should try another approach.
For example, in your Page_Load event you could use code like this:
btn_submit.Text = GetText("abc.xml","btn_text")

-- 
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net



"NEMA"  wrote in message 
news:1187627283.861214.89540@z24g2000prh.googlegroups.com...

> Hello everyone,
>
> i have a problem while setting the button text recently
>
> for my case, i would like to set the text of the button on the aspx
> page, i have write the code like below
>
> <asp:button id="btn_submit" text='<%# GetText("abc.xml","btn_text")
> %>' >
>
> where the GetText is a function which will retrieve a string in xml
> The page can run but the text cannot be display on the button. i am
> sure that the function is work as i have tried it on the code-behind
> like: btn_submit.text = GetText("abc.xml","btn_text") , it work fine
> with no problem but it dont work while i try it in the aspx page.
>
> Did anyone try it before and please give me some hints. Thanks everyone
> 
Date:Mon, 20 Aug 2007 10:44:49 -0700   Author:  

Re: Setting Text of a button   
Just call the DataBind() method for the page and <%# .. %> will work

-- 
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


"NEMA"  wrote in message
news:1187630783.410474.322680@m37g2000prh.googlegroups.com...

> Thanks
>
> So how can i execute that function
> i have also try <%= GetText("abc.xml","btn_text") %> but it is not
> work too
>
> On 8 21 ,   12 43 , "Eliyahu Goldin"
>  wrote:
> > <%# ... is a databinding expression. You need to call DataBind method to
> > execute it.
> >
> > --
> > Eliyahu Goldin,
> > Software Developer
> > Microsoft MVP

[ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net

> >
> > "NEMA"  wrote in message
> >
> > news:1187627283.861214.89540@z24g2000prh.googlegroups.com...
> >
> >
> >
> > > Hello everyone,
> >
> > > i have a problem while setting the button text recently
> >
> > > for my case, i would like to set the text of the button on the aspx
> > > page, i have write the code like below
> >
> > > <asp:button id="btn_submit" text='<%# GetText("abc.xml","btn_text")
> > > %>' >
> >
> > > where the GetText is a function which will retrieve a string in xml
> > > The page can run but the text cannot be display on the button. i am
> > > sure that the function is work as i have tried it on the code-behind
> > > like: btn_submit.text = GetText("abc.xml","btn_text") , it work fine
> > > with no problem but it dont work while i try it in the aspx page.
> >
> > > Did anyone try it before and please give me some hints. Thanks

everyone-         -

> >
> > -         -
>
>
Date:Mon, 20 Aug 2007 21:08:45 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us