代码在哪里?! [英] Where's the code?!

查看:108
本文介绍了代码在哪里?!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一位经验丰富的.NET 1.1开发人员,但我现在正在使用Visual Studio 2005 Professional(SP1)查看.NET 2.0

。我设置了一个基本的ADO .NET ASP

..NET Web应用程序项目并添加了一个SQL Express数据库,一个

应用程序数据源(到那个SQL DB)然后将我的SQL表拖到

a空白ASP .NET WebForm上并自动创建了一个DataGridView。我运行页面,并且所有内容(包括编辑/删除/分页)都运行良好 -

非常漂亮!


所以,我打开了设计师代码文件(不是我的代码隐藏)看到

生成的代码,令我惊讶的是,我在这个文件中看到的只是对象

我的页面控件的实例化,但这些控件都没有基础

代码。


自动生成的代码在哪里与设计师进行控制

工作如此我可以看看,并可能调整代码?


-Scott

I am an experienced .NET 1.1 developer, but am just now looking at .NET 2.0
with Visual Studio 2005 Professional (SP1). I set up a basic ADO .NET ASP
..NET Web Application project and added a SQL Express database, an
application data source (to that SQL DB) and then dragged my SQL table onto
a blank ASP .NET WebForm and got a DataGridView created automatically. I
run the page and everything (including editing/deleting/paging) works fine -
pretty slick!

So, I open up the "designer" code file (not my code-behind) to see the
generated code, and to my surprise, all I see in this file are the object
instantiations for my page controls, but none of those controls underlying
code.

Where is the automatically generated code that make controls with designers
work so that I can look at, and possibly tweak the code?

-Scott

推荐答案

使用
进行控制的自动生成代码在哪里
Where is the automatically generated code that make controls with

设计师工作以便我可以查看,并可能调整代码?
designers work so that I can look at, and possibly tweak the code?



如果您点击显示所有文件解决方案资源管理器中的按钮,你应该能够看到额外的文件。


它们被命名为MyForm.designer.vb,并嵌套在主要的

文件就像RESX文件一样。


希望这有帮助


-

Rory

If you hit the "Show All Files" button in the solution explorer, you should
be able to see the additional files.

They are named things like MyForm.designer.vb and are nested under the main
files like RESX files would be.

Hope this helps

--
Rory


可能已经在App_Code文件夹中创建了文件(如果有的话),

扩展.xsd查看所有.cs代码(所有强类型数据集/表??)

可能是也可能不是你想要的。??


点亮


" Scott M." < sm ** @ nospam.nospamwrote in message

news:8F **************************** ****** @ microsof t.com ...
might have created file for you in the App_Code folder if you have one,
expand .xsd see all .cs codes ( all strongly typed dataset/table ??)
may or may not be what you are looking for.??

Lit

"Scott M." <sm**@nospam.nospamwrote in message
news:8F**********************************@microsof t.com...

>我是一位经验丰富的.NET 1.1开发人员,但我刚才看到的是.NET 2.0
使用Visual Studio 2005 Professional(SP1)。我设置了一个基本的ADO .NET ASP
.NET Web应用程序项目并添加了一个SQL Express数据库,一个
应用程序数据源(到那个SQL DB),然后将我的SQL表拖到
上一个空白的ASP .NET WebForm并自动创建了一个DataGridView。我运行页面,所有内容(包括编辑/删除/分页)都很有效 - 非常漂亮!


所以,我打开了设计师。代码文件(不是我的代码隐藏)看到

生成的代码,令我惊讶的是,我在这个文件中看到的只是对象

我的页面控件的实例化,但是这些控件都没有底层

代码。


自动生成的代码在哪里进行控制

设计师工作如此我可以看看,并可能调整代码?


-Scott
>I am an experienced .NET 1.1 developer, but am just now looking at .NET 2.0
with Visual Studio 2005 Professional (SP1). I set up a basic ADO .NET ASP
.NET Web Application project and added a SQL Express database, an
application data source (to that SQL DB) and then dragged my SQL table onto
a blank ASP .NET WebForm and got a DataGridView created automatically. I
run the page and everything (including editing/deleting/paging) works
fine - pretty slick!

So, I open up the "designer" code file (not my code-behind) to see the
generated code, and to my surprise, all I see in this file are the object
instantiations for my page controls, but none of those controls underlying
code.

Where is the automatically generated code that make controls with
designers work so that I can look at, and possibly tweak the code?

-Scott



否我已经这样做了,正如我所说,代码不在designer.vb

文件中,也不在代码隐藏中。


..resx文件是资源文件,不包含VB .NET或C#代码(只有

..cs和.vb文件将包含此内容。)

" Rory Becker < Ro ******** @ newsgroup.nospamwrote in message

news:b0 ********************** **** @ msnews.microsoft .com ...
No, I have done that and, as I said, the code is not in the designer.vb
file, nor is it in the code-behind.

..resx files are resource files and will not contain VB .NET or C# code (only
..cs and .vb files will contain this).
"Rory Becker" <Ro********@newsgroup.nospamwrote in message
news:b0**************************@msnews.microsoft .com...

>自动生成的代码用于控制<设计师工作,以便我可以查看,并可能调整代码?
>Where is the automatically generated code that make controls with
designers work so that I can look at, and possibly tweak the code?



如果你点击显示所有文件解决方案资源管理器中的按钮,你

应该能够看到其他文件。


它们被命名为MyForm.designer.vb,并嵌套在这些

主要文件就像RESX文件一样。


希望这会有所帮助


-

Rory


If you hit the "Show All Files" button in the solution explorer, you
should be able to see the additional files.

They are named things like MyForm.designer.vb and are nested under the
main files like RESX files would be.

Hope this helps

--
Rory


这篇关于代码在哪里?!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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