Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 使用umbraco添加类文件_Asp.net_Visual Studio_Umbraco - Fatal编程技术网

Asp.net 使用umbraco添加类文件

Asp.net 使用umbraco添加类文件,asp.net,visual-studio,umbraco,Asp.net,Visual Studio,Umbraco,我有一个名为test.ascx的登录页,还有一个名为test.ascx.cs的登录页。在web配置中,我设置了一个数据库。连接到数据库时出现问题。我将所有面向连接的代码都写入一个名为test.cs的类文件中。如何在umbraco中添加此类文件 ascx代码是 <div style="border:solid 1px red;margin:50px 0px 0px 400px;width:275px; height: 98px; text-align:center;"> <asp

我有一个名为test.ascx的登录页,还有一个名为test.ascx.cs的登录页。在web配置中,我设置了一个数据库。连接到数据库时出现问题。我将所有面向连接的代码都写入一个名为test.cs的类文件中。如何在umbraco中添加此类文件

ascx代码是

<div style="border:solid 1px red;margin:50px 0px 0px 400px;width:275px; height: 98px;
text-align:center;">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
<asp:TextBox ID="txtpass" runat="server"></asp:TextBox><br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /><br />
<asp:Label ID="lblmsg" runat="server"></asp:Label>

</div>





您可以使用宏将用户控件添加到umbraco中。为此,您必须创建一个web项目,并将其dll添加到您的umbraco bin文件夹中。如果您有类文件,那么通过添加此dll,您也可以使用该类

您必须将ascx文件添加到usercontrol文件夹中,并且必须使用此usercontrol创建宏


请检查

您有什么问题?你为什么要使用登录页面?你想完成什么?注意:Umbraco有后端用户和前端用户(成员)。max.its not css class.its(.cs)class.添加dll将无法获得它。我尝试了…无论如何感谢您的回复朋友您创建了web项目吗?如果是web项目,则您将DLL添加到项目中,并且必须将这些DLL添加到bin文件夹中。