博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
I_am_tbag
......!!!
Iamtbag.cublog.cn
管理博客
发表文章
留言
收藏夹
· 我的好友
博客圈
音乐
相册
导入文章
文章
· 程序设计
· 心情随笔
· ajax
· 数据库
· 我的英语
· Lucene
· Flex
首页
关于作者
姓名:Special Weapons And Tactics 职业:狙击手 位置:Hidden 个性介绍:Sharp-Shooter Sniper
||
<<
>>
||
我的分类
最新照片
上一张
下一张
幻灯片
停止播放
最新文章
·
SessionId 你到底知道多少?
·
Jquery Asp.net
·
iMVC(3) - RouteValueDic..
·
iMVC(2) - Ioc
·
IQueryable
·
Using an IoC Container
·
iMVC(1)-public abstract..
·
MvC(1)
·
Asp.net 一个小提示!
·
jquery 无刷新多选框删除..
最新留言
·
本站网友
您好,想问您一下是否有一..
·
QQ691116012
哈哈tbag 可是个变态~~~莫..
最新评论
·
2010, <a href="http://ww..
·
很好啊, 收藏了
推荐一个..
·
哈哈哈哈哈哈哈~看了这个今..
·
学oracle ,看看官方doc。..
·
http://www.xianyun.info/..
最新收藏
·
美剧迷
·
撒贝宁
·
徐俐
·
阿丘
·
史小诺
·
尼格买提
·
季小军
·
谢颖颖
·
老赵点滴
·
丁丁
·
于洋
·
戴玲
·
搜索--chen liang
·
胡子
·
马宁艺
·
神笔漫画
·
洪晃找乐
·
痞子-好兄弟
·
babyblue
·
裙子
统计信息
·
总访问量:97674
·
文章个数:149
·
评论条数:10
·
留言条数:2
·
网友推荐:
【置顶】我们 牵手 吧! 收集了网络上的所有相关图片
<DIV align=center> <DIV align=center> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/071129042715.jpg" onload="javascript:if(this.width>500)this.width=500;" border=0><BR><BR></DIV></DIV></DIV> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/071129042809.jpg" onload="javascript:if(this.width>500)this.width=500;" border=0></DIV> <DIV align=center> <BR> <DIV align=center> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/071129043221.jpg" onload="javascript:if(this.width>500)this.width=500;" border=0></DIV><BR> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/071129043246.jpg" onload="javascript:if(this.width>500)this.width=500;" border=0><BR><BR> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/071129043652.jpg" onload="javascript:if(this.width>500)this.width=500;" border=0><BR><BR> <DIV align=center><IMG src="http://blogimg.chinaunix.net/blog/upfile2/07112904381……
查看全文
发表于:2007-11-29 ┆
阅读(662)
┆
评论(0)
SessionId 你到底知道多少?
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: verdana,sans-serif; font-size: 14px; line-height: 21px; text-align: left;"><p class="MsoNormal" style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 21.25pt; line-height: 15.7pt;">Session又称为会话状态,是Web系统中最常用的状态,用于维护和当前浏览器实例相关的一些信息。举个例子来说,我们可以把已登录用户的用户名放在Session中,这样就能通过判断Session中的某个Key来判断用户是否登录,如果登录的话用户名又是多少。</p><p class="MsoNormal" style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 21.25pt; line-height: 15.7pt;">Session对于每一个客户端(或者说浏览器实例)是“人手一份”,用户首次与Web服务器建立连接的时候,服务器会给用户分发一个SessionID作为标识。SessionID是一个由24个字符组成的随机字符串。用户每次提交页面,浏览器都会把这个SessionID包含在HTTP头中提交给Web服务器,这样Web服务器就能区分当前请求页面的是哪一个客户端。那么,ASP.NET 2.0提供了哪些存储SessionID的模式呢:</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"> Cookie(默认)。如果客户端禁止了Cookie的使用,Session也将失效。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"> URL。Cookie是否开启不影响Session使用,缺点是不能再使用绝对链接了。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;">ASP.NET 2.0对于Session内容的存储也提供了多种模式。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"> InProc(默认)。Session存储在IIS进程中(Web服务器内存)。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"> StateServer。Session存储在独立的Windows服务进程中(可以不是Web服务器)。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"> SqlServer。Session存储在SqlServer数据库的表中(SqlServer服务器)。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"><br></p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: verdana,sans-serif; font-size: 14px; line-height: 21px; text-align: left;"><p class="MsoNormal" style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 21pt; line-height: 15.9pt;">在使用Session的过程中你可能还会遇到很多奇怪的问题,结束本节之前笔者列出了几条常见的FAQ,供大家参考:</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 为什么每次请求的SessionID都不相同?</p><p class="3" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 可能是没有在Session里面保存任何信息引起的,即程序中任何地方都没有使用Session。只有在Session中保存了内容后,Session才会和浏览器进行关联,此时的SessionID将不会再变化。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 为什么当我设置cookieless为true后,在重定向的时候会丢失Session?</p><p class="3" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 当使用cookieless时,你必须使用相对路径替换程序中的绝对路径,如果使用绝对路径,ASP.NET将无法在URL中保存SessionID。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 有办法知道应用程序的Session在运行时占用了多少内存吗?</p><p class="3" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 没有办法,你可以通过观察IIS进程(InProc模式)或者aspnet_state进程(StateServer模式)大致估计。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em;"> 有没有可能知道整个网站使用Session的用户列表?</p><p class="3" style="padding: 0px; margin: 1em 0px 0.5em;"> 对于InProc模式和StateServer模式很难,对于SqlServer模式你可以查询存储Session的表进行尝试。</p><p class="7" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 当页面中设了frameset,发现在每个frame中显示页面的SessionID在第一次请求时都不相同,为什么?</p><p class="3" style="padding: 0px; margin: 1em 0px 0.5em; line-height: 15.9pt;"> 原因是你的frameset是放在一个HTML页面上而不是ASPX页面。在一般情况下,如果frameset是aspx页面,当你请求页面时,它首先将请求发送到Web服务器,此时已经获得了SessionID,接着浏览器会分别请求Frame中的其他页面,这样所有页面的SessionID就是一样的,就是FrameSet页面的SessionID。然而如果你使用HTML页面做FrameSet页面,第一个请求将是HTML页面,当该页面从服务器上返回时并没有任何Session产生,接着浏览器会请求Frame里面的页面,这样,这些页面都会产生自己的SessionID,所以在这种情况下就可能出现这种问题。当你重新刷新页面时,SessionID就会一样,并且是最后一个请求页面的SessionID。</p></span></span></p></span></span>
查看全文
发表于:2010-08-19 ┆
阅读(179)
┆
评论(2)
Jquery Asp.net
/*获得TEXT.AREATEXT的值*/<br>var textval = $("#text_id").attr("value");<br>var textval = $("#text_id").val();<br><br>/*获取单选按钮的值*/<br>var valradio = $("input[type=radio]:checked").val();<br><br>/*获取一组名为(items)的radio被选中项的值*/<br>var item = $('input[name=items]:checked').val();<br><br>/*获取复选框的值*/<br>var checkboxval = $("#checkbox_id").attr("value");<br><br>/*获取下拉列表的值*/<br>var selectval = $('#select_id').val();<br><br>/*文本框,文本区域*/<br>$("#text_id").attr("value",");//清空内容<br>$("#text_id").attr("value",'test');//填充内容<br><br>/*多选框checkbox*/<br>$("#chk_id").attr("checked",");//使其未勾选<br>$("#chk_id").attr("checked",true);//勾选<br><br>if($("#chk_id").attr('checked')==true) //判断是否已经选中<br><br>/*单选组radio*/<br>$("input[type=radio]").attr("checked",'2');//设置value=2的项目为当前选中项<br><br>/*下拉框select*/<br>$("#select_id").attr("value",'test');//设置value=test的项目为当前选中项<br>$("testtest2").appendTo("#select_id")//添加下拉框的option<br>$("#select_id").empty();//清空下拉框<br><br>/*获取一组名为(items)的radio被选中项的值*/<br>var item = $('input[name=items]:checked').val(); //若未被选中 则val() = undefined<br><br>/*获取select被选中项的文本*/<br>var item = $("select[name=items] option:selected").text();<br><br>/*select下拉框的第二个元素为当前选中值*/<br>$('#select_id')[0].selectedIndex = 1;<br><br>/*radio单选组的第二个元素为当前选中值*/<br>$('input[name=items]').get(1).checked = true;<br><br>/*重置表单*/<br>$("form").each(function(){<br>.reset();<br>});<br><br>
查看全文
发表于:2010-08-16 ┆
阅读(79)
┆
评论(0)
iMVC(3) - RouteValueDictionary Class
<p xmlns="http://www.w3.org/1999/xhtml">The <span><span class="selflink">RouteValueDictionary</span></span> class enables you to work with collections of key/value pairs that are required in order to use ASP.NET routing. You use the <span><span class="selflink">RouteValueDictionary</span></span> object to define values for the <span><a href="http://msdn.microsoft.com/en-us/library/system.web.routing.route.constraints.aspx">Constraints</a></span>, <span><a href="http://msdn.microsoft.com/en-us/library/system.web.routing.route.datatokens.aspx">DataTokens</a></span>, and <span><a href="http://msdn.microsoft.com/en-us/library/system.web.routing.route.defaults.aspx">Defaults</a></span> properties. You also use a <span><span class="selflink">RouteValueDictionary</span></span> object when you generate a URL by calling the <span><a href="http://msdn.microsoft.com/en-us/library/system.web.routing.routecollection.getvirtualpath.aspx">GetVirtualPath</a></span> method and passing a <span><span class="selflink">RouteValueDictionary</span></span> object as a parameter.</p><p xmlns="http://www.w3.org/1999/xhtml">Every key in a <span><span class="selflink">RouteValueDictionary</span></span> object must be unique. The <span><span class="selflink">RouteValueDictionary</span></span> class uses case-insensitive ordinal comparison. For more information, see <span><a href="http://msdn.microsoft.com/en-us/library/system.stringcomparer.ordinalignorecase.aspx">OrdinalIgnoreCase</a></span>. A key cannot be <span><span class="input"><span xmlns="">null</span></span><span xmlns=""></span></span>.</p><br><br><br>
查看全文
发表于:2010-08-13 ┆
阅读(57)
┆
评论(0)
iMVC(2) - Ioc
public class WindsorControllerFactory : DefaultControllerFactory <br> { <br> WindsorContainer container; <br><br> // The constructor: <br> // 1. Sets up a new IoC container <br> // 2. Registers all components specified in web.config <br> // 3. Registers all controller types as components <br> public WindsorControllerFactory() <br> { <br> // Instantiate a container, taking configuration from web.config <br> container = new WindsorContainer( <br> new XmlInterpreter(new ConfigResource("castle")) <br> ); <br><br> // Also register all the controller types as transient <br> var controllerTypes = from t in Assembly.GetExecutingAssembly().GetTypes() <br> where typeof(IController).IsAssignableFrom(t) <br> select t; <br> foreach(Type t in controllerTypes) <br> container.AddComponentWithLifestyle(t.FullName, t, <br> LifestyleType.Transient); <br> } <br><br> // Constructs the controller instance needed to service each request <br> protected override IController GetControllerInstance(Type controllerType) <br> { <br> return (IController)container.Resolve(controllerType); <br> } <br> }
查看全文
发表于:2010-08-12 ┆
阅读(123)
┆
评论(0)
IQueryable
// Summary:<br> // Provides functionality to evaluate queries against a specific data source<br> // wherein the type of the data is known.<br> //<br> // Type parameters:<br> // T:<br> // The type of the data in the data source.This type parameter is covariant.<br> // That is, you can use either the type you specified or any type that is more<br> // derived. For more information about covariance and contravariance, see Covariance<br> // and Contravariance in Generics.<br> public interface IQueryable<out T> : IEnumerable<T>, IQueryable, IEnumerable<br> {<br> }
查看全文
发表于:2010-08-12 ┆
阅读(85)
┆
评论(0)
Using an IoC Container
An IoC container is a standard software component that supports and simplifies IoC. It lets <br> you register a set of components (i.e., abstract types and your currently chosen concrete <br> implementations), and then handles the business of instantiating them. You can configure <br> and register components either with an XML file or with C# code (or both). <br> At runtime, you can call a method similar to container.Resolve(Type type), where <br> typecould be a particular interfaceor abstracttype or a particular concrete type, and the <br> container will return an object satisfying that type definition, according to whatever concrete <br> type is configured. It sounds trivial, but a good IoC container adds three extra clever features: <br><br>Dependency chain resolution: If you request a component that itself has dependencies <br> (e.g., constructor parameters), the container will satisfy those dependencies recursively, <br> so you can have component A, which depends on B, which depends on C, and so on. In <br> other words, you can forget about the wiring on your component circuit board—just <br> think about the components, because wiring happens magically. <br><br> Object lifetime management: If you request component A more than once, should you get <br> the same actual instance of A each time, or a fresh new instance each time? The container <br> will usually let you configure the “lifestyle” of a component, allowing you to select from <br> predefined options including singleton (the same instance each time), transient (a new <br> instance each time), instance-per-thread, instance-from-a-pool, and so on. <br><br> Explicit constructor parameter values configuration: For example, if the constructor for <br> MembersRepositorydemands a string called connectionString, (as ours did earlier), you can configure a value for it in your XML config file. It’s a crude but simple configuration <br> system that removes any need for your code to pass around connection strings, SMTP <br> server addresses, and so on. <br><br> So, in the preceding example, you’d configure MembersRepositoryas the active concrete <br> implementation for IMembersRepository. Then, when some code calls container.Resolves <br> (typeof(AdminController)), the container will figure out that to satisfy AdminController’ <br> constructor parameters it first needs an object implementing IMembersRepository. It will <br> get one according to whatever concrete implementation you’ve configured (in this case, <br> MembersRepository), supplying the connectionStringyou’ve configured. It will then use that to <br> instantiate and return an AdminController. <br><br><br>
查看全文
发表于:2010-08-12 ┆
阅读(66)
┆
评论(0)
iMVC(1)-public abstract class Controller : Control
// Summary:<br> // Initializes a new instance of the System.Web.Mvc.Controller class.<br> protected Controller();<br><br> // Summary:<br> // Gets the action invoker for the controller.<br> //<br> // Returns:<br> // The action invoker.<br> public IActionInvoker ActionInvoker { get; set; }<br> //<br> // Summary:<br> // Gets or sets the binder.<br> //<br> // Returns:<br> // The binder.<br> protected internal ModelBinderDictionary Binders { get; set; }<br> //<br> // Summary:<br> // Gets HTTP-specific information about an individual HTTP request.<br> //<br> // Returns:<br> // The HTTP context.<br> public HttpContextBase HttpContext { get; }<br> //<br> // Summary:<br> // Gets the model state dictionary object that contains the state of the model<br> // and of model-binding validation.<br> //<br> // Returns:<br> // The model state dictionary.<br> public ModelStateDictionary ModelState { get; }<br> //<br> // Summary:<br> // Gets the System.Web.HttpRequestBase object for the current HTTP request.<br> //<br> // Returns:<br> // The request object.<br> public HttpRequestBase Request { get; }<br> //<br> // Summary:<br> // Gets the System.Web.HttpResponseBase object for the current HTTP response.<br> //<br> // Returns:<br> // The response object.<br> public HttpResponseBase Response { get; }<br> //<br> // Summary:<br> // Gets the route data for the current request.<br> //<br> // Returns:<br> // The route data.<br> public RouteData RouteData { get; }<br> //<br> // Summary:<br> // Gets the System.Web.HttpServerUtilityBase object that provides methods that<br> // are used during Web request processing.<br> //<br> // Returns:<br> // The HTTP server object.<br> public HttpServerUtilityBase Server { get; }<br> //<br> // Summary:<br> // Gets the System.Web.HttpSessionStateBase object for the current HTTP request.<br> //<br> // Returns:<br> // The HTTP session-state object for the current HTTP request.<br> public HttpSessionStateBase Session { get; }<br> //<br> // Summary:<br> // Gets the temporary-data provider object that is used to store data for the<br> // next request.<br> //<br> // Returns:<br> // The temporary-data provider.<br> public ITempDataProvider TempDataProvider { get; set; }<br> //<br> // Summary:<br> // Gets the URL helper object that is used to generate URLs by using routing.<br> //<br> // Returns:<br> // The URL helper object.<br> public UrlHelper Url { get; set; }<br> //<br> // Summary:<br> // Gets the user security information for the current HTTP request.<br> //<br> // Returns:<br> // The user security information for the current HTTP request.<br> public IPrincipal User { get; }<br><br> // Summary:<br> // Creates a content result object by using a string.<br> //<br> // Parameters:<br> // content:<br> // The content to write to the response.<br> //<br> // Returns:<br> // The content result instance.<br> protected internal ContentResult Content(string content);<br> //<br> // Summary:<br> // Creates a content result object by using a string and the content type.<br> //<br> // Parameters:<br> // content:<br> // The content to write to the response.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // Returns:<br> // The content result instance.<br> protected internal ContentResult Content(string content, string contentType);<br> //<br> // Summary:<br> // Creates a content result object by using a string, the content type, and<br> // content encoding.<br> //<br> // Parameters:<br> // content:<br> // The content to write to the response.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // contentEncoding:<br> // The content encoding.<br> //<br> // Returns:<br> // The content result instance.<br> protected internal virtual ContentResult Content(string content, string contentType, Encoding contentEncoding);<br> //<br> // Summary:<br> // Creates an action invoker.<br> //<br> // Returns:<br> // An action invoker.<br> protected virtual IActionInvoker CreateActionInvoker();<br> //<br> // Summary:<br> // Creates a temporary data provider.<br> //<br> // Returns:<br> // A temporary data provider.<br> protected virtual ITempDataProvider CreateTempDataProvider();<br> //<br> // Summary:<br> // Releases all resources that are used by the current instance of the System.Web.Mvc.Controller<br> // class.<br> public void Dispose();<br> //<br> // Summary:<br> // Releases unmanaged resources and optionally releases managed resources.<br> //<br> // Parameters:<br> // disposing:<br> // true to release both managed and unmanaged resources; false to release only<br> // unmanaged resources.<br> protected virtual void Dispose(bool disposing);<br> //<br> // Summary:<br> // Invokes the action in the current controller context.<br> protected override void ExecuteCore();<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.FileContentResult object by using the file contents<br> // and file type.<br> //<br> // Parameters:<br> // fileContents:<br> // The binary content to send to the response.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // Returns:<br> // The file-content result object.<br> protected internal FileContentResult File(byte[] fileContents, string contentType);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.FileStreamResult object by using the System.IO.Stream<br> // object and content type.<br> //<br> // Parameters:<br> // fileStream:<br> // The stream to send to the response.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // Returns:<br> // The file-content result object.<br> protected internal FileStreamResult File(Stream fileStream, string contentType);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.FilePathResult object by using the file name and<br> // the content type.<br> //<br> // Parameters:<br> // fileName:<br> // The path of the file to send to the response.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // Returns:<br> // The file-stream result object.<br> protected internal FilePathResult File(string fileName, string contentType);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.FileContentResult object by using the file contents,<br> // content type, and the destination file name.<br> //<br> // Parameters:<br> // fileContents:<br> // The binary content to send to the response.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // fileDownloadName:<br> // The file name to use in the file-download dialog box that is displayed in<br> // the browser.<br> //<br> // Returns:<br> // The file-content result object.<br> protected internal virtual FileContentResult File(byte[] fileContents, string contentType, string fileDownloadName);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.FileStreamResult object using the System.IO.Stream<br> // object, the content type, and the target file name.<br> //<br> // Parameters:<br> // fileStream:<br> // The stream to send to the response.<br> //<br> // contentType:<br> // The content type (MIME type)<br> //<br> // fileDownloadName:<br> // The file name to use in the file-download dialog box that is displayed in<br> // the browser.<br> //<br> // Returns:<br> // The file-stream result object.<br> protected internal virtual FileStreamResult File(Stream fileStream, string contentType, string fileDownloadName);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.FilePathResult object by using the file name, the<br> // content type, and the file download name.<br> //<br> // Parameters:<br> // fileName:<br> // The path of the file to send to the response.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // fileDownloadName:<br> // The file name to use in the file-download dialog box that is displayed in<br> // the browser.<br> //<br> // Returns:<br> // The file-stream result object.<br> protected internal virtual FilePathResult File(string fileName, string contentType, string fileDownloadName);<br> //<br> // Summary:<br> // Called when a request matches this controller, but no method with the specified<br> // action name is found in the controller.<br> //<br> // Parameters:<br> // actionName:<br> // The name of the attempted action.<br> protected virtual void HandleUnknownAction(string actionName);<br> //<br> // Summary:<br> // Initializes data that might not be available when the constructor is called.<br> //<br> // Parameters:<br> // requestContext:<br> // The HTTP context and route data.<br> protected override void Initialize(RequestContext requestContext);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.JavaScriptResult object.<br> //<br> // Parameters:<br> // script:<br> // The JavaScript code to run on the client<br> //<br> // Returns:<br> // The System.Web.Mvc.JavaScriptResult object that writes the script to the<br> // response.<br> protected internal virtual JavaScriptResult JavaScript(string script);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.JsonResult object that serializes the specified<br> // object to JavaScript Object Notation (JSON).<br> //<br> // Parameters:<br> // data:<br> // The JavaScript object graph to serialize.<br> //<br> // Returns:<br> // The JSON result object that serializes the specified object to JSON format.<br> // The result object that is prepared by this method is written to the response<br> // by the MVC framework when the object is executed.<br> protected internal JsonResult Json(object data);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.JsonResult object that serializes the specified<br> // object to JavaScript Object Notation (JSON) format using the specified JSON<br> // request behavior.<br> //<br> // Parameters:<br> // data:<br> // The JavaScript object graph to serialize.<br> //<br> // behavior:<br> // The content type (MIME type).<br> //<br> // Returns:<br> // The result object that serializes the specified object to JSON format.<br> protected internal JsonResult Json(object data, JsonRequestBehavior behavior);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.JsonResult object that serializes the specified<br> // object to JavaScript Object Notation (JSON) format.<br> //<br> // Parameters:<br> // data:<br> // The JavaScript object graph to serialize.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // Returns:<br> // The JSON result object that serializes the specified object to JSON format.<br> protected internal JsonResult Json(object data, string contentType);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.JsonResult object that serializes the specified<br> // object to JavaScript Object Notation (JSON) format.<br> //<br> // Parameters:<br> // data:<br> // The JavaScript object graph to serialize.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // contentEncoding:<br> // The content encoding.<br> //<br> // Returns:<br> // The JSON result object that serializes the specified object to JSON format.<br> protected internal virtual JsonResult Json(object data, string contentType, Encoding contentEncoding);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.JsonResult object that serializes the specified<br> // object to JavaScript Object Notation (JSON) format using the specified content<br> // type and JSON request behavior.<br> //<br> // Parameters:<br> // data:<br> // The JavaScript object graph to serialize.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // behavior:<br> // The JSON request behavior<br> //<br> // Returns:<br> // The result object that serializes the specified object to JSON format.<br> protected internal JsonResult Json(object data, string contentType, JsonRequestBehavior behavior);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.JsonResult object that serializes the specified<br> // object to JavaScript Object Notation (JSON) format using the content type,<br> // content encoding, and the JSON request behavior.<br> //<br> // Parameters:<br> // data:<br> // The JavaScript object graph to serialize.<br> //<br> // contentType:<br> // The content type (MIME type).<br> //<br> // contentEncoding:<br> // The content encoding.<br> //<br> // behavior:<br> // The JSON request behavior<br> //<br> // Returns:<br> // The result object that serializes the specified object to JSON format.<br> protected internal virtual JsonResult Json(object data, string contentType, Encoding contentEncoding, JsonRequestBehavior behavior);<br> //<br> // Summary:<br> // Called after the action method is invoked.<br> //<br> // Parameters:<br> // filterContext:<br> // Information about the current request and action.<br> protected virtual void OnActionExecuted(ActionExecutedContext filterContext);<br> //<br> // Summary:<br> // Called before the action method is invoked.<br> //<br> // Parameters:<br> // filterContext:<br> // Information about the current request and action.<br> protected virtual void OnActionExecuting(ActionExecutingContext filterContext);<br> //<br> // Summary:<br> // Called when authorization occurs.<br> //<br> // Parameters:<br> // filterContext:<br> // Information about the current request and action.<br> protected virtual void OnAuthorization(AuthorizationContext filterContext);<br> //<br> // Summary:<br> // Called when an unhandled exception occurs in the action.<br> //<br> // Parameters:<br> // filterContext:<br> // Information about the current request and action.<br> protected virtual void OnException(ExceptionContext filterContext);<br> //<br> // Summary:<br> // Called after the action result that is returned by an action method is executed.<br> //<br> // Parameters:<br> // filterContext:<br> // Information about the current request and action result<br> protected virtual void OnResultExecuted(ResultExecutedContext filterContext);<br> //<br> // Summary:<br> // Called before the action result that is returned by an action method is executed.<br> //<br> // Parameters:<br> // filterContext:<br> // Information about the current request and action result<br> protected virtual void OnResultExecuting(ResultExecutingContext filterContext);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.PartialViewResult object that renders a partial<br> // view.<br> //<br> // Returns:<br> // A partial-view result object.<br> protected internal PartialViewResult PartialView();<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.PartialViewResult object that renders a partial<br> // view, by using the specified model.<br> //<br> // Parameters:<br> // model:<br> // The model that is rendered by the partial view<br> //<br> // Returns:<br> // A partial-view result object.<br> protected internal PartialViewResult PartialView(object model);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.PartialViewResult object that renders a partial<br> // view, by using the specified view name.<br> //<br> // Parameters:<br> // viewName:<br> // The name of the view that is rendered to the response.<br> //<br> // Returns:<br> // A partial-view result object.<br> protected internal PartialViewResult PartialView(string viewName);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.PartialViewResult object that renders a partial<br> // view, by using the specified view name and model.<br> //<br> // Parameters:<br> // viewName:<br> // The name of the view that is rendered to the response.<br> //<br> // model:<br> // The model that is rendered by the partial view<br> //<br> // Returns:<br> // A partial-view result object.<br> protected internal virtual PartialViewResult PartialView(string viewName, object model);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.RedirectResult object that redirects to the specified<br> // URL.<br> //<br> // Parameters:<br> // url:<br> // The URL to redirect to.<br> //<br> // Returns:<br> // The redirect result object.<br> protected internal virtual RedirectResult Redirect(string url);<br> //<br> // Summary:<br> // Redirects to the specified action using the action name.<br> //<br> // Parameters:<br> // actionName:<br> // The name of the action.<br> //<br> // Returns:<br> // The redirect result object.<br> protected internal RedirectToRouteResult RedirectToAction(string actionName);<br> //<br> // Summary:<br> // Redirects to the specified action using the action name and route values.<br> //<br> // Parameters:<br> // actionName:<br> // The name of the action.<br> //<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect result object.<br> protected internal RedirectToRouteResult RedirectToAction(string actionName, object routeValues);<br> //<br> // Summary:<br> // Redirects to the specified action using the action name and route dictionary.<br> //<br> // Parameters:<br> // actionName:<br> // The name of the action.<br> //<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect result object.<br> protected internal RedirectToRouteResult RedirectToAction(string actionName, RouteValueDictionary routeValues);<br> //<br> // Summary:<br> // Redirects to the specified action using the action name and controller name.<br> //<br> // Parameters:<br> // actionName:<br> // The name of the action.<br> //<br> // controllerName:<br> // The name of the controller<br> //<br> // Returns:<br> // The redirect result object.<br> protected internal RedirectToRouteResult RedirectToAction(string actionName, string controllerName);<br> //<br> // Summary:<br> // Redirects to the specified action using the action name, controller name,<br> // and route values.<br> //<br> // Parameters:<br> // actionName:<br> // The name of the action.<br> //<br> // controllerName:<br> // The name of the controller<br> //<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect result object.<br> protected internal RedirectToRouteResult RedirectToAction(string actionName, string controllerName, object routeValues);<br> //<br> // Summary:<br> // Redirects to the specified action using the action name, controller name,<br> // and route dictionary.<br> //<br> // Parameters:<br> // actionName:<br> // The name of the action.<br> //<br> // controllerName:<br> // The name of the controller<br> //<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect result object.<br> protected internal virtual RedirectToRouteResult RedirectToAction(string actionName, string controllerName, RouteValueDictionary routeValues);<br> //<br> // Summary:<br> // Redirects to the specified route using the specified route values.<br> //<br> // Parameters:<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect-to-route result object.<br> protected internal RedirectToRouteResult RedirectToRoute(object routeValues);<br> //<br> // Summary:<br> // Redirects to the specified route using the route dictionary.<br> //<br> // Parameters:<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect-to-route result object.<br> protected internal RedirectToRouteResult RedirectToRoute(RouteValueDictionary routeValues);<br> //<br> // Summary:<br> // Redirects to the specified route using the route name.<br> //<br> // Parameters:<br> // routeName:<br> // The name of the route<br> //<br> // Returns:<br> // The redirect-to-route result object.<br> protected internal RedirectToRouteResult RedirectToRoute(string routeName);<br> //<br> // Summary:<br> // Redirects to the specified route using the route name and route values.<br> //<br> // Parameters:<br> // routeName:<br> // The name of the route<br> //<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect-to-route result object.<br> protected internal RedirectToRouteResult RedirectToRoute(string routeName, object routeValues);<br> //<br> // Summary:<br> // Redirects to the specified route using the route name and route dictionary.<br> //<br> // Parameters:<br> // routeName:<br> // The name of the route<br> //<br> // routeValues:<br> // The parameters for a route.<br> //<br> // Returns:<br> // The redirect-to-route result object.<br> protected internal virtual RedirectToRouteResult RedirectToRoute(string routeName, RouteValueDictionary routeValues);<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> //<br> // Exceptions:<br> // System.ArgumentNullException:<br> // The model parameter or the System.Web.Mvc.ControllerBase.ValueProvider property<br> // is null.<br> protected internal bool TryUpdateModel<TModel>(TModel model) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> protected internal bool TryUpdateModel<TModel>(TModel model, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider and a prefix.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> //<br> // Exceptions:<br> // System.ArgumentNullException:<br> // The model parameter or the System.Web.Mvc.ControllerBase.ValueProvider property<br> // is null.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string prefix) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider and included properties.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> //<br> // Exceptions:<br> // System.ArgumentNullException:<br> // The model parameter or the System.Web.Mvc.ControllerBase.ValueProvider property<br> // is null.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string[] includeProperties) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider<br> // and a prefix.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider, a prefix, and included properties.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> //<br> // Exceptions:<br> // System.ArgumentNullException:<br> // The model parameter or the System.Web.Mvc.ControllerBase.ValueProvider property<br> // is null.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider<br> // and a list of properties to include.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string[] includeProperties, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider,<br> // a prefix, and included properties.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider, a prefix, a list of properties to exclude, and a list of<br> // properties to include.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // excludeProperties:<br> // A list of properties to explicitly exclude from the update. These are excluded<br> // even if they are listed in the includeProperties parameter list.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> //<br> // Exceptions:<br> // System.ArgumentNullException:<br> // The model parameter or the System.Web.Mvc.ControllerBase.ValueProvider property<br> // is null.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider,<br> // a prefix, a list of properties to exclude , and a list of properties to include.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // excludeProperties:<br> // A list of properties to explicitly exclude from the update. These are excluded<br> // even if they are listed in the includeProperties parameter list.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Returns:<br> // true if the update is successful; otherwise, false.<br> protected internal bool TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Validates the specified model instance.<br> //<br> // Parameters:<br> // model:<br> // The model instance to validate.<br> //<br> // Returns:<br> // true if the model validation is successful; otherwise, false.<br> protected internal bool TryValidateModel(object model);<br> //<br> // Summary:<br> // Validates the specified model instance using an HTML prefix.<br> //<br> // Parameters:<br> // model:<br> // The model to validate.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the model provider.<br> //<br> // Returns:<br> // true if the model validation is successful; otherwise, false.<br> protected internal bool TryValidateModel(object model, string prefix);<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> //<br> // Exceptions:<br> // System.InvalidOperationException:<br> // The model was not successfully updated.<br> protected internal void UpdateModel<TModel>(TModel model) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider and a prefix.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // A prefix to use when looking up values in the value provider.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string prefix) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller object's<br> // current value provider.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string[] includeProperties) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider<br> // and a prefix.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string prefix, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider, a prefix, and included properties.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // A prefix to use when looking up values in the value provider.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider,<br> // a prefix, and a list of properties to include.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string[] includeProperties, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider,<br> // a prefix, and a list of properties to include.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the controller's current<br> // value provider, a prefix, a list of properties to exclude, and a list of<br> // properties to include.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // A prefix to use when looking up values in the value provider.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // excludeProperties:<br> // A list of properties to explicitly exclude from the update. These are excluded<br> // even if they are listed in the includeProperties list.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) where TModel : class;<br> //<br> // Summary:<br> // Updates the specified model instance using values from the value provider,<br> // a prefix, a list of properties to exclude, and a list of properties to include.<br> //<br> // Parameters:<br> // model:<br> // The model instance to update.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the value provider.<br> //<br> // includeProperties:<br> // A list of properties of the model to update.<br> //<br> // excludeProperties:<br> // A list of properties to explicitly exclude from the update. These are excluded<br> // even if they are listed in the includeProperties parameter list.<br> //<br> // valueProvider:<br> // A dictionary of values that is used to update the model.<br> //<br> // Type parameters:<br> // TModel:<br> // The type of the model object.<br> protected internal void UpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties, IValueProvider valueProvider) where TModel : class;<br> //<br> // Summary:<br> // Validates the specified model instance.<br> //<br> // Parameters:<br> // model:<br> // The model to validate.<br> protected internal void ValidateModel(object model);<br> //<br> // Summary:<br> // Validates the specified model instance using an HTML prefix.<br> //<br> // Parameters:<br> // model:<br> // The model to validate.<br> //<br> // prefix:<br> // The prefix to use when looking up values in the model provider.<br> protected internal void ValidateModel(object model, string prefix);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object that renders a view to the response.<br> //<br> // Returns:<br> // The view result that renders a view to the response.<br> protected internal ViewResult View();<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object that renders the specified System.Web.Mvc.IView<br> // object.<br> //<br> // Parameters:<br> // view:<br> // The view that is rendered to the response.<br> //<br> // Returns:<br> // The view result.<br> protected internal ViewResult View(IView view);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object by using the model that renders<br> // a view to the response.<br> //<br> // Parameters:<br> // model:<br> // The model that is rendered by the view.<br> //<br> // Returns:<br> // The view result.<br> protected internal ViewResult View(object model);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object by using the view name that renders<br> // a view.<br> //<br> // Parameters:<br> // viewName:<br> // The name of the view that is rendered to the response.<br> //<br> // Returns:<br> // The view result.<br> protected internal ViewResult View(string viewName);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object that renders the specified System.Web.Mvc.IView<br> // object.<br> //<br> // Parameters:<br> // view:<br> // The view that is rendered to the response.<br> //<br> // model:<br> // The model that is rendered by the view.<br> //<br> // Returns:<br> // The view result.<br> protected internal virtual ViewResult View(IView view, object model);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object by using the view name and model<br> // that renders a view to the response.<br> //<br> // Parameters:<br> // viewName:<br> // The name of the view that is rendered to the response.<br> //<br> // model:<br> // The model that is rendered by the view.<br> //<br> // Returns:<br> // The view result.<br> protected internal ViewResult View(string viewName, object model);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object using the view name and master-page<br> // name that renders a view to the response.<br> //<br> // Parameters:<br> // viewName:<br> // The name of the view that is rendered to the response.<br> //<br> // masterName:<br> // The name of the master page or template to use when the view is rendered.<br> //<br> // Returns:<br> // The view result.<br> protected internal ViewResult View(string viewName, string masterName);<br> //<br> // Summary:<br> // Creates a System.Web.Mvc.ViewResult object using the view name, master-page<br> // name, and model that renders a view.<br> //<br> // Parameters:<br> // viewName:<br> // The name of the view that is rendered to the response.<br> //<br> // masterName:<br> // The name of the master page or template to use when the view is rendered.<br> //<br> // model:<br> // The model that is rendered by the view.<br> //<br> // Returns:<br> // The view result.<br> protected internal virtual ViewResult View(string viewName, string masterName, object model);
查看全文
发表于:2010-08-11 ┆
阅读(90)
┆
评论(0)
MvC(1)
<form enctype="multipart/form-data">...</form> <div><br></div><div><br></div><div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"> Without that enctypeattribute, the browser will transmit only the name of the file—not its </span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"> contents—which is no use to us! Force the enctypeattribute to appear by updating Edit.aspx’s </span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"> call to Html.BeginForm(): </span></font></div><div><br></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"> <% using (Html.BeginForm("Edit", "Admin", FormMethod.Post, </span></font></div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px;"> new { enctype = "multipart/form-data" })) { %> </span></font></div></div><div><br></div>
查看全文
发表于:2010-08-10 ┆
阅读(156)
┆
评论(0)
Asp.net 一个小提示!
nNote The syntax surrounding Html.RenderPartial() is a little different from that surrounding<br>most other HTML helpers. Look closely, and you’ll see that it’s surrounded with <% ...; %> rather than<br><%= ... %>. The difference is that Html.RenderPartial() doesn’t return an HTML string, as most other<br>HTML helpers do. Instead, it emits text directly to the response stream, so it’s a complete line of C# code<br>rather than a C# expression to be evaluated. That’s because it might in theory be used to produce giant<br>amounts of data, and it wouldn’t be efficient to buffer all that data in memory as a string.
查看全文
发表于:2010-08-07 ┆
阅读(270)
┆
评论(0)
版权所有 ChinaUnix.net 页面生成时间:0.03041