Solved

explicite Resource

Posted on 2013-01-16
3
260 Views
Last Modified: 2013-01-17
Hello,

I use explicite localization. Now I want combine the Resource string with a other string for the text attribute of a button control
like this:

<asp:Button ID="Button1" runat="server" Text="<%$ Resources:cari, EK %> test" />

but this doesn't work - havy anyone a solution?

Thank you
Reiner
0
Comment
Question by:seffer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Rajar Ahmed earned 500 total points
ID: 38783309
Try this,
    <asp:Button ID="Button1" runat="server" Text='<%# String.Format("{0}{1}",Resources.myResource.cari,"test")  %> ' ></asp:Button>

Open in new window


protected void Page_Load(object sender, EventArgs e)
    {
        Button1.DataBind();
    }

Open in new window

0
 

Author Comment

by:seffer
ID: 38783552
ok thank you, it works

But how can I do this with controls which I can not databinding?

Thank you
Reiner
0
 
LVL 18

Expert Comment

by:Rajar Ahmed
ID: 38783575
If your using expression binding on aspx you have to databind the corresponding control or you can call Page.DataBind(); globally.
Page.DataBind();

Open in new window

0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question