HighTechTalks DotNet Forums  

ASP.Net Web Server Control Template

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss ASP.Net Web Server Control Template in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
VR
 
Posts: n/a

Default ASP.Net Web Server Control Template - 01-22-2005 , 02:19 PM






Hi, I'm facing a little problem with an ASP.Net DataList Template. Inside
this Template I put an asp:linkButton control and set it's text to "Click
me". When I tryed to get the value from a Resource with a ResourceManager
object and write it to the control's text property inside the Template I got
a blank string:

<asp:LinkButton CommandArgument="1" OnClick="DoSth">
<%= resMang.GetString("linkButtonString")%>
</asp:LinkButton>

Then I tryed to build this Template by code and things got worse, the code
above is sent right to the browser.

Does anyone knows how to use a resource string to set a web server control's
text property in an ASP.Net Web Form?


Thanks a lot,
Victor




Reply With Quote
  #2  
Old   
Steven Cheng
 
Posts: n/a

Default Re: ASP.Net Web Server Control Template - 02-16-2005 , 11:36 PM






Hi Victor,

<%= %> is used in page's template but can't be embeded in webcontrol's
server tag.
You can set the value in page's codebehind file. Or use the DataBinding
expression like
<%# helperfunction name %>

of cource, you need to call the control.DataBind or Page.DataBind to make
the expression get executed.

HTH. tHANKS.

Steven

"VR" <vcreb (AT) hotmail (DOT) com> wrote

Quote:
Hi, I'm facing a little problem with an ASP.Net DataList Template. Inside
this Template I put an asp:linkButton control and set it's text to "Click
me". When I tryed to get the value from a Resource with a ResourceManager
object and write it to the control's text property inside the Template I
got a blank string:

asp:LinkButton CommandArgument="1" OnClick="DoSth"
%= resMang.GetString("linkButtonString")%
/asp:LinkButton

Then I tryed to build this Template by code and things got worse, the code
above is sent right to the browser.

Does anyone knows how to use a resource string to set a web server
control's text property in an ASP.Net Web Form?


Thanks a lot,
Victor






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.