无需重新编译ASP.NET应用程序中编辑资源文件

编程入门 行业动态 更新时间:2024-10-22 04:54:51
本文介绍了无需重新编译ASP.NET应用程序中编辑资源文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想,以使资源文件是部署后编辑。我读this后这表明这是可能的,但我似乎无法找出什么设置,我需要改变,以使这一点。

I'd like to enable the resource files to be editable after deployment. I read this post which suggests that this is possible, but I can't seem to figure out what settings I need to change to enable this.

我已经加入了文件夹App_GlobalResources文件到我的ASP.NET 3.5Web应用程序,并增加了一个资源文件到这个文件夹。我认为需要更改该文件的生成操作,但无论怎样我生成操作改变,我无法实现上述功能。

I have added the App_GlobalResources folder to my ASP.NET 3.5 "Web Application" and added a resource file to this folder. I assume that the Build Action for this file needs to be changed, but no matter what I change the Build Action to, I cannot achieve the above stated functionality.

在App_GlobalResources文件夹和资源文件复制到bin目录中。一旦部署,不被显示给.resx文件的任何修改。

The App_GlobalResources folder and the resource file are copied into the bin directory. Once deployed, any edits to the .resx file are not being displayed.

任何想法?

推荐答案

一个Web应用程序项目比一个网站项目不同。我怀疑你可以达到你想要一个Web应用程序项目什么。你可以看看这篇文章:

A Web Application project is different than a Web Site project. I doubt you can achieve what you want with a Web Application project. You might check out this post:

stackoverflow/questions/398037/asp-net-web-site-or-web-application

资源通常意味着是静态的。它们是项目,如图像,字符串和文件程序消耗,并且可以依靠为present,(因此可以在串/ RESX文件的情况下进行强类型)。之所以使用的资源是简单地捆绑它们与你的DLL,使分布和引用的资源变得更加容易。

Resources are generally meant to be static. They are items such as images, strings, and files that your program consumes and can rely on being present, (and therefore can be strongly typed in the case of strings/RESX files). The reason for using resources is simply to bundle them in with your DLL's so that distribution and referencing the resources becomes much easier.

在运行时可编辑建议您可能要使用的项目或用户设置,或者一个数据库?如果您需要使用RESX文件可能需要编写code读/写。

Editable at runtime suggests you might want to use project or user Settings, or maybe a database? If you need to use RESX files you might need to write code to read/write them.

更多推荐

无需重新编译ASP.NET应用程序中编辑资源文件

本文发布于:2023-11-07 11:09:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566287.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   编辑   文件   资源   ASP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!