我想知道如何在使用vb.net的代码中使用asp.net4.0全局化动态控件 [英] I wish to know how can we globalize a dynamis control in asp.net4.0 inthe code behind using vb.net
问题描述
我是初学者。我有一个应用程序,它使用ResourceManager从SQL Server 2005中挑选数据来实现全球化。
iam a beginner. I have an application which implements globalization using ResourceManager picking data from SQL Server 2005.
我一直在使用Text ="<%$ Resources:"在.aspx中全局化静态控件。 label.text" %>"。
I have been Globalizing static controls in the .aspx using Text="<%$ Resources: "label.text" %>".
但是现在我想在后面的代码中全局化动态控件,
However now i want to globalize a dynamic control in the code behind say,
;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; Dim lblSample As New Label
lblSample .ID =" HelloLabel"
Dim lblSample As New Label
lblSample .ID = "HelloLabel"
我试过这种方式:
&NBSP; Dim sourceProvider As New DBResourceProvider("Hello")
Dim sourceProvider As New DBResourceProvider("Hello")
lblSample .Text = sourceProvider.GetObject(" Hello",System.Globalization.CultureInfo.CurrentUICulture)
lblSample .Text = sourceProvider.GetObject("Hello", System.Globalization.CultureInfo.CurrentUICulture)
由于存储过程未获得,因此无效执行说不写"只写"属性"。
This is not working out as the stored procedure is not getting executed saying Write-Only Properties are not suppoerted".
有人可以帮助我...提前谢谢! &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;
Can somebody please help me out...Thanks in advance!
推荐答案
请使用 http://forums.asp .net 获取有关ASP.Net Web应用程序和服务的帮助。
Please use http://forums.asp.net for help with ASP.Net web applications and services.
这篇关于我想知道如何在使用vb.net的代码中使用asp.net4.0全局化动态控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!