问题标签 [dotnetnuke-7]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
368 浏览

dotnetnuke - DNN7 填充 Dotnetnuke 中注册页面的下拉列表

我是 Dotnetnuke 的新手。

我有一个关于 DNN 自定义注册表单的问题。我创建了一个自定义注册表单,并在数据类型列表的表单上添加了 DropDownList,并在其中添加了条目。它显示了 DropDownList。

现在我的问题是;我需要从 Db 表中填充这个 DropDownList 。所以在 DNN7 中它是如何可能的。谢谢你..!!!

0 投票
3 回答
263 浏览

iis-7 - DotNetNuke Module keeps converting itself into Application in IIS7

Bit of a weird one. For some reason one of my DNN modules keeps being converted into an Application in IIS7 in my development environment. Meaning when I try to view a page that contains that module it can't find the module correctly. It's ok if I go into IIS and delete the application, then restart the site but is a bit of a pain and am little worried it might do this when uploaded to the live server and disable the whole site.

Anyone encountered anything like this before? Any thoughts?

0 投票
1 回答
290 浏览

dotnetnuke - 在 DOTNETNUKE 中可用的内置视频流设备?

在 DOTNETNUKE 中可用的内置视频流设备?

0 投票
1 回答
1622 浏览

c# - 在 DNN 7+ 中应该如何使用 LoggerSource?

我一直在考虑在我的 DNN 7+ 站点上实现日志记录。我想要一个可配置的日志级别,例如 log4net 提供的级别。

我尝试按照此处的 DNN 站点http://www.dnnsoftware.com/community-blog/cid/141723/Using-log4net-with-DotNetNuke上的说明集成 log4net 。添加引用和代码行以使用日志记录后:

该代码报告了一条警告,内容如下:

'DotNetNuke.Instrumentation.DnnLog' 已过时:'"由于性能不佳,在 7.0.1 中已弃用,请使用 LoggerSource.Instance"'

我很难找到有关正确做事方式的信息。似乎“DnnLog”已被替换为与 log4net 交互的类似类,称为“DnnLogger”。使用此类(和“LoggerSource”类)的区别之一是不再使用静态方法完成日志记录。

用于检索记录器实例的“GetLogger()”函数需要一些参数,我还没有找到任何描述适当用法的文档。DNN 源有很多例子。从这些示例看来,适当的用法是提供当前类。在声明类“MyClass”的文件“MyClass.cs”中,以下内容似乎是正确的:

或者

使用 typeof() 的第一行代码返回什么记录器?我的意思是,这个记录器会使用为站点配置的 log4net 设置吗?如果不使用 log4net 设置,日志文件保存在哪里,配置设置在哪里调整?我的书呆子想知道 typeof() 类参数到底发生了什么,为什么要使用它?

如果第一个示例不与 log4net 连接(或允许可配置的易于使用的日志记录级别),那么第二个选项是要走的路吗?如果是这样,要传递的适当字符串是什么?“MyClass”是我的猜测,但我无法确认。

如果我在这里完全偏离轨道并且应该从另一个方向接近这个问题,请随时提出建议。

非常感谢大家!

0 投票
3 回答
633 浏览

sql - Why are DAL2 queries missing field names and showing SELECT NULL?

I am creating a module for use in DNN 7+ and would like to use DAL2 for data access but am having some problems selecting items from the database.

My code appears to be connecting to the database successfully but the queries that are generated by DAL2 do not include the names of the fields in the database table. I an running an SQL Server Profiler to watch what gets to the database and see queries that start with "SELECT NULL FROM Product...". I expect to see "SELECT * FROM Product..." or "SELECT ProductCode FROM Product..."

For the purposes of isolating the problem and being able to include a full code sample, I have worked my test down to the following: I have a Product.cs file:

I have a ProductRepository.cs file:

I use these two files in my view with the following code:

While running this code, I monitor using the SQL Server Profiler and see that the following query is executed:

I don't know why the select query above is selecting NULL. I am expecting a list of product fields from the Product.cs file, or the * character.

My database field definition (as seen from the tree view of the Microsoft SQL Server Management Studio) for the productCode is:

I am connecting to an external database and the data is not connected with a specific module or portal. That is why I specify "productCode" as the Scope. I am not sure what the proper use of Scope is when the data is not tied to the portal or module. To make sure the problem was not connected to the Scope attribute in the Product.cs file I tested with the Scope variable set to "PortalId", "ModuleId", "productCode", and "Nothing". All of these values resulted in the same query showing up in the SQL Server Profiler.

I also tested by removing the Scope attribute entirely. When the Scope attribute was not included I saw the following query in the SQL Server Profiler:

I am not sure why the WHERE clause was removed when the Scope attribute was excluded, but that is what test results showed.

These tests with the Scope attribute lead me to believe it is not related to the "SELECT NULL" problem I am seeing but I wanted to include it here for completeness.

Can anyone help, why is this creating a select with NULL and how do I get it to select my data?

Thanks!

0 投票
0 回答
1016 浏览

installation - DNN7 安装错误

每当我尝试使用或不使用 WebMatrix 安装 DNN7 时,都会遇到相同的错误。我认为尝试了所有解决方案 - 为文件夹提供了适当的权限,使用了真正的排序规则。但不工作。每当我安装时,我都会收到此错误。

安装日志:10/10/2013 14:01:59 [错误] DotNetNuke.Services.Upgrade.Upgrade System.Data.SqlClient.SqlException (0x80131904): 必须声明标量变量“@portalid”。

0 投票
1 回答
483 浏览

c# - 如何在 DNN 7+ 中使用带有 DAL2 的复合键?

我在 DNN 7+ 中使用 DAL2。

我有一个带有从 2-varchar(50) 字段创建的主键的数据库表。

在对象的属性中声明多字段主键的正确方法是什么?
我通常这样做:

我应该只添加第二个 PrimaryKey 属性吗?

问题的第二部分是如何从数据库中取出数据。
我想使用 GetById() 函数,因为它包含缓存,但它似乎不支持多个字段。我是否坚持使用 Find() 方法并手动处理缓存,或者选择使用多字段主键的对象的最佳方法是什么?

“像屏幕一样仰望天空!”

0 投票
2 回答
530 浏览

c# - 带有 Telerik RadButton 的 DNN 不会从资源文件中呈现文本

我希望有人可以帮助我解决问题。

DNN我正在创建的自定义模块中,我有一个RadButtonText显示resource file. 其他控件确实从资源文件中读取值。

ascx我从和尝试过code behind。另一个奇怪的事情是,从后面的代码调试应用程序时,我看到了该Text属性。

控制定义为:

我也进行了本地化Page_Load

页面呈现为:

Sys.Application.add_init函数显示:

我知道控件知道来自 add_init 的文本,但呈现的按钮没有得到它。有人可以帮我解决这个问题吗?

我正在为 Framework 4.0 使用 DNN 7.0.2,VS 2012

0 投票
1 回答
905 浏览

dotnetnuke-module - 具有多个 sqlprovider 安装脚本的 DNN 模块

语境

  • 我有一个使用多个表的 DNN 7 模块。

  • 为了清晰和易于使用,我将 CREATE TABLE 语句放在单独的文件中。

  • 我的模块的 .dnn 文件在 components 标记下的每个脚本都有多个条目。

问题

当我安装模块时,只执行最后一个安装脚本(在示例“CreateProductWidths”的情况下),忽略其他。

问题

如何在安装期间在单独的文件中运行多个脚本?我在这个模块中总共有 15 个表,因此将它们的所有定义都放在一个脚本中是不利的。如果太难了,我可能做错了,我愿意接受建议。谢谢。

例子

0 投票
1 回答
990 浏览

dotnetnuke - 将 javascript 文件添加到容器控件

在我的皮肤中,我有一个模块容器,我想在其中添加一个 JavaScript 文件。
没问题,我使用:

唯一的问题是,该脚本不在skins 文件夹中:

但在容器文件夹中:

添加上面的代码将不起作用,因为它会生成一个指向皮肤文件夹的链接:

如果我使用这个简单的代码,它确实有效:

但是后来我就失去了所有的优势了ClientResourceManagement

查看源代码和文档,只有两种PathNameAlias类型,它们都不是用于容器的。

我将脚本添加到容器文件夹的原因是它只用于那个容器,而没有其他地方使用。

有人知道解决方案吗?
我自己的容易实现PathNameAlias吗?