小编use*_*115的帖子

带有Razor引擎的ASP.NET MVC 3中的"/"应用程序中的服务器错误

我刚刚使用Razor引擎创建了一个新的ASP.NET MVC 3项目.我在控制器文件夹中添加了一个控制器,然后在homController.cs我添加了一个视图.

View(index.cshtml)只有这个代码:

@{
   ViewBag.Title = "Home";
}

<h2>Home</h2>
Run Code Online (Sandbox Code Playgroud)

当我开始调试时,它显示了这个错误:

Server Error in '/' Application.
The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Run Code Online (Sandbox Code Playgroud)

有什么问题?

c# asp.net razor asp.net-mvc-3

6
推荐指数
1
解决办法
2万
查看次数

为什么我不能在asp.net中的文本框中应用css?

我在asp.net中的文本框上应用css时遇到问题!

这是我的文本框:

<asp:TextBox ID="TextBox1" CssClass="textbox" runat="server" Height="22px" Width="128px" 
    BackColor="#CCCCCC"></asp:TextBox>
Run Code Online (Sandbox Code Playgroud)

如你所见,我将CssClass添加到文本框中.这是我正在使用的CSS

.textbox
{ 
   background-color: Red;
   font-weight: bold;
}
Run Code Online (Sandbox Code Playgroud)

问题是什么?我用Google搜索,但找不到答案!!

css asp.net textbox

1
推荐指数
1
解决办法
8577
查看次数

标签 统计

asp.net ×2

asp.net-mvc-3 ×1

c# ×1

css ×1

razor ×1

textbox ×1