为什么我找不到带.Aspx的.Aspx.Cs文件 [英] Why I Cannot Find The .Aspx.Cs File With .Aspx

查看:501
本文介绍了为什么我找不到带.Aspx的.Aspx.Cs文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友我正在使用visual studio开发Web应用程序,当我将我的html网站导入我的asp.net visual studio解决方案并将扩展名从.html转换为.aspx时,现在没有文件(default.aspx.cs)使用default.aspx我需要(defaul.aspx.cs)文件来编写数据库等代码

请提前帮助我!

friends i am using visual studio to develop web applications when i import my html website into my asp.net visual studio solution and convert the extension from .html to .aspx now there is no file of (default.aspx.cs) with default.aspx i need for (defaul.aspx.cs) file to write code for database etc
please help me thanks in advance !

推荐答案

只需将代码文件添加到项目中即可。如果您希望它正确地嵌套在解决方案资源管理器中,请编辑.csproj文件,如:



Just add a code code file to your project. If you want it to appear nested in Solution Explorer correctly, edit the .csproj file like:

<Compile Include="Global.asax.cs">
  <DependentUpon>Global.asax</DependentUpon>
</Compile>


参考: HTTP:// stackoverf low.com/questions/9770482/create-code-behind-file-after-aspx-has-been-created [ ^ ]


这篇关于为什么我找不到带.Aspx的.Aspx.Cs文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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