禁用code隐藏页面上设计视图 [英] Disable design view on code-behind page

查看:122
本文介绍了禁用code隐藏页面上设计视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看我的工作才能到code-beind在.aspx页面时,但有时只是出于习惯成自然的我再次命中F7(不知道为什么我经常打F7,但它发生的频率足以被frsutrating)。在$ C $击中F7 C-背后切换到设计视图,往往时间需要一段时间才能呈现在.aspx。

I often hit F7 when viewing the .aspx page I am working on to get to the code-beind, but sometimes just out of natural habit I hit F7 again (not sure why, but it happens often enough to be frsutrating). Hitting F7 on the code-behind switches to design view for the .aspx which often times takes a while to render.

我已经有源视图为默认打开,但我想F7时,在code-背后交换回的.aspx来源,而不是设计......这可能吗?

I already have 'source view' as the default open, but I would like F7 when in the code-behind to swap back to the .aspx source instead of design... is this possible?

推荐答案

HTTP://www.$c$cproject.com/KB/macros/ToggleAspNet$c$cBehind.aspx打印=真
进行了以下修改应该是什么需要:

http://www.codeproject.com/KB/macros/ToggleAspNetCodeBehind.aspx?print=true with the following modifications should be what you need:

**Change the line:**
    OpenCodeBehindFile(activeDoc)
to:
  OpenCodeBehindFile(activeDoc & ".cs")

**Change the line in OpenCodeBehindFile from:**
  projItem.Open(Constants.vsViewKindCode)
to:
  projItem.Open(Constants.vsViewKindCode).Activate()

参考:<一href=\"http://social.msdn.microsoft.com/forums/en-US/csharpide/thread/90ccfd68-c083-49a4-947a-03178d6af288/\" rel=\"nofollow\">http://social.msdn.microsoft.com/forums/en-US/csharpide/thread/90ccfd68-c083-49a4-947a-03178d6af288/

这篇关于禁用code隐藏页面上设计视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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