K
KMILO
Thank you for answerme so quickly!!
Look at my code:
ResourceManager RexMan = new ResourceManager("Site", Assembly.GetExecutingAssembly());
this.lblDomains.Text = RexMan.GetString("Domain.Text");
this.lblDomainSelected.Text = RexMan.GetString("DomainSelected.Text");
this.lblPassword.Text = RexMan.GetString("Password.Text");
this.lblUser.Text = RexMan.GetString("User.Text");
this.btnAccept.Text = RexMan.GetString("Accept.Text");
this.btnCancel.Text = RexMan.GetString("Cancel.Text");
this.RFVPassword.ErrorMessage = RexMan.GetString("PasswordError.Text");
this.RFVUser.ErrorMessage = RexMan.GetString("UserError.Text");
this code belongs to a web control, It is invoked for a web form, the resource file is Site.resources, the project folder structure is like this
--GenericSite (the web project)
--WebControls
LoginControl (ascx Control)
--Pages
Login (aspx Page)
--Resources
Site.resources (resource file)
web.config
global.asax
Namespace project = GenericSite
If I want to work with resources, does I have to write another code in other place into the project?
Thanks!!!
Look at my code:
ResourceManager RexMan = new ResourceManager("Site", Assembly.GetExecutingAssembly());
this.lblDomains.Text = RexMan.GetString("Domain.Text");
this.lblDomainSelected.Text = RexMan.GetString("DomainSelected.Text");
this.lblPassword.Text = RexMan.GetString("Password.Text");
this.lblUser.Text = RexMan.GetString("User.Text");
this.btnAccept.Text = RexMan.GetString("Accept.Text");
this.btnCancel.Text = RexMan.GetString("Cancel.Text");
this.RFVPassword.ErrorMessage = RexMan.GetString("PasswordError.Text");
this.RFVUser.ErrorMessage = RexMan.GetString("UserError.Text");
this code belongs to a web control, It is invoked for a web form, the resource file is Site.resources, the project folder structure is like this
--GenericSite (the web project)
--WebControls
LoginControl (ascx Control)
--Pages
Login (aspx Page)
--Resources
Site.resources (resource file)
web.config
global.asax
Namespace project = GenericSite
If I want to work with resources, does I have to write another code in other place into the project?
Thanks!!!