在Web矩阵中使用C#在Asp.Net中登录表单代码 [英] Login form code in Asp.Net using c# in web matrix
本文介绍了在Web矩阵中使用C#在Asp.Net中登录表单代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人请给我在Web矩阵的cshtml扩展中使用c#登录asp.net的代码.
Anyone plz give me the code for login in asp.net using c# in web matrix''s cshtml extension.
推荐答案
好吧,不.
因为您的问题定义得太少,并且没有像"Web矩阵的cshtml"之类的东西.该扩展名是与剃刀视图引擎 [ ^ ] ="http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc"> ASP.NET MVC3 [ ASP.NET身份验证 [ http://msdn.microsoft.com/en-us/library/ee377605.aspx) [ ^ ])
Well, no.
Because your question is too underdefined and there is nothing like "web matrix''s cshtml". That one is the extension associated with Razor view engine[^] in ASP.NET MVC3[^] and above. And you will get nothing with just a login form. ASP.NET authentication[^] is more complex than that.
But if you start an MVC3 project in Visual Studio (not the empty project template), and you choose the internet site (form authentication), you will get a good sample. (http://msdn.microsoft.com/en-us/library/ee377605.aspx)[^])
这篇关于在Web矩阵中使用C#在Asp.Net中登录表单代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文