需要对于.NET母版页名字改编的解决方法 [英] Need workaround for .Net Master Page Name Mangling

查看:161
本文介绍了需要对于.NET母版页名字改编的解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我评估转换旧的框架基础asp.net网站使用母版页。拖我的唯一的事情就是工作的数量巨大,将采取更新的每个页面来处理名字改编。我的大部分问题是用JavaScript引用硬codeD标识的。

I'm evaluating converting an old frameset based asp.net website to use master pages. The only thing holding me back is the huge amount of work it will take to update every page to deal with name mangling. Most of my problems are with javascript referencing hardcoded Id's.

有没有办法让我告诉ASP.Net对于特定内容领域,我不想重整发生。交给我处理名称冲突。

Is there a way for me to tell ASP.Net that for a particular content area that I don't want mangling to occur. Leave it to me deal with name conflicts.

注意

我知道.NET 4.0具有本作这里详细的解决方案。我想,这并不需要等待一个解决方案,需要将.NET 3.5。

I'm aware .Net 4.0 has a solution for this as detailed here. I want a solution that doesn't involve waiting, needs to be .Net 3.5.

更新

对于开源替代品masterpages将由得到我,直到.NET 4.0有什么建议?或者怎么样一个黑客工作的解决方案来解决该截断。谢谢

Any suggestions for opensource alternatives to masterpages that will get me by until .Net 4.0? Or how about a hack job solution to work around the mangling. Thanks

推荐答案

唯一的支持的方式来做到这一点是不使用被定义为=服务器,元素。否则,.NET 4.0的是,您将得到一个一致的,支持的机制,使这一变化的第一次。

The only "supported" way to do this is to NOT use elements that are defined as "runat="server"". Otherwise, .NET 4.0 is the first time that you are given a consistent, supported mechanism to make this change.

您也许能够通过其他手段来解决这个问题,但是这将是很容易/快速实施什么。

You might be able to get around this via other means, but nothing that is going to be easy/quick to implement.

这篇关于需要对于.NET母版页名字改编的解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆