asp.net mvc的初学

0.参考资料:http://www.cnblogs.com/Leeyong/archive/2010/10/19/1855526.html

                 http://www.cnblogs.com/Leeyong/archive/2010/10/29/1864358.html

 

1. 调用不同的 控制器,控制器里的方法,不过要依靠的URL 默认的 URL 是 /Controller/ActionName/Parameters  就是 控制器/方法/参数

     http://localhost:5653/HelloWorld/Index

 

2.   Server.HTMLEncode用法!!

 

Server.HTMLEncode

HTMLEncode

一.HTMLEncode 方法对指定的字符串应用 HTML 编码。

语法

Server.HTMLEncode( string )

参数

 

string
指定要编码的字符串。

 

示例

脚本

<%= Server.HTMLEncode("The paragraph tag: <P>") %>

输出

The paragraph tag: &lt;P&gt;

注意 以上输出将被 Web 浏览器显示为

The paragraph tag: <P>

如果查看一下源文件或以文本方式打开一个 Web 页,您就可以看到已编码的 HTML

3. Unable to update the EntitySet because it has a DefiningQuery and no element exists in the element to support the current operation 错误的解决:

   因为创建表的时候没有设置主键。。。。。。参见:http://www.developer2blog.com/post/2012/05/10/Unable-to-update-the-EntitySet-because-it-has-a-DefiningQuery-and-no-element-exists-in-the-element-to-support-the-current-operation.aspx

 

 

 

 

 

转载于:https://www.cnblogs.com/gorgeous1314/archive/2012/07/18/2597236.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值