问题标签 [asp.net-dynamic-data]
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.
asp.net - Asp.Net,动态数据网站,外键一对一关系,DropdownList,如何自定义?
我正在使用 Asp.Net 的动态数据网站项目类型。我创建了一个数据库,它在使用外键指定的两个表之间具有一对一的关系(这可能是一对多,但我使用 linq 设计器将其更改为一对一的关系)。
即我有一个表 Invoice 和表 CreditNote,它以 Invoice_Id 作为外键
我希望当我导航到 CreditNotes/Insert.aspx 时,它会在下拉列表中显示 InvoiceIds 列表。它几乎做到了 - 它创建下拉列表,但只填充选项值而不是文本,所以我在 html 源代码中得到类似的东西(注意只有值被填充 - 对用户来说看起来是空的):
谁能告诉我如何解决这个问题?提前感谢您的帮助!
asp.net - 动态数据的加扰 URL
混淆动态数据中创建的 url 的最佳方法是什么?
例如 \Products\List.aspx?ProductId=2 可能变成
\Products\List.aspx?x=UHJvZHVjdElkPTI=
其中“ProductId=2”是 base 64 编码以防止随意窥探
\Products\List.aspx?ProductId=3
\Products\List.aspx?ProductId=4
ETC...?
我可能不得不从现有对象继承并覆盖某些功能问题是哪个对象和什么功能
Metamodel 对象的 GetActionPath 看起来很有趣,但是 DynamicRoute "{table}/{Action}.aspx" 如何在其中发挥作用......
现在在 Asp.net 1.1 站点上,我使用以下代码的自定义实现。 http://www.mvps.org/emorcillo/en/code/aspnet/qse.shtml HTTPModule 使用正则表达式重写所有查询字符串,并通过反射更改解码值的查询字符串集合。
那么影响变化的钩子在哪里。
asp.net - 具有自己的元数据的 asp.net 动态数据站点
我正在搜索有关在 asp.NET 动态站点中配置自己的元数据的信息。
例如。我在 MS Sql Server 中有一个表,其结构如下所示:
我有 2 个 Ms Sql 表(我已经创建),sysTables 和 sysColumns。
系统表:
ID sysTableName 表名 TableDescription
1 | someTable |Persons |关于系统中人员的所有数据
系统列:
ID TableName sysColumnName ColumnName ColumnDesc ColumnType MUnit
1 |一些表 | sometable_pname| 姓名 | 角色名称(例如约翰)| nvarchar(20) | 空
2 |someTable | sometable_Fullname| 全名 | 角色名称(例如 John Black)| nvarchar(50) | 空
3 |someTable | sometable_age| 年龄 | 人年龄| 整数 | 无效的
我希望在Details/Edit/Insert/List/ListDetails页面中用作 MetaData sysColumns 和 sysTableData。因为,例如。在 DetailsPage fullName中,它不如Full Name漂亮。
一些想法,有可能吗?
谢谢
更新::在列表页面中显示来自 sysTables(元数据表)的数据,我已修改<h2 class="DDSubHeader"><%= tableName%></h2>
。
那么,sysColums 呢?如何从我的sysColumns表中获取数据?
linq-to-sql - Error using Dynamic Data Filtering: missing datasource
I am trying to use the ASP.NET Dynamic Data Filtering project, but I'm running into a problem during the configuration.
I'm following the instructions on the author's blog, and everything works like described. Then it tells me to change the datasource using the designer view. I am told to select the "GridDataSource" in the "Configure data source" wizard. This option is not there though.
I get all of the classes in my project, including the DataContext that was generated by Linq. When I choose "Show only DataContext objects", the dropdown ("Choose your context object:") is completely empty.
When I turn of the checkbox and choose my DataContext class, I get asked which table I want and all that. But, as the whole purpose of a Dynamic Data site is NOT to use one single table, that's not much help.
So I've looked at the instructions again and copied the resulting datasource from the example:
Which is exactly what I had, without the "WhereParameters" nodes in there.
Now, when I run the list page however, I get an exception about a missing datasource from the filtering component. Of course when I remove the DynamicFilterRepeater, it works again.
This is the meat of the exception:
[InvalidOperationException: Missing DataSource] Catalyst.Web.DynamicData.DynamicFilterRepeater.GetTable() in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:74 Catalyst.Web.DynamicData.DynamicFilterRepeater.GetFilters() in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:81 Catalyst.Web.DynamicData.DynamicFilterRepeater.OnInit(EventArgs e) in D:\Catalyst\Projects\DynamicData\Project\Trunk\DynamicData\DynamicData\DynamicFilterRepeater.cs:106
How do I make the DynamicFilterRepeater recognize my datasource?
I'm using VS2010 Pro, on a Win7 machine.
entity-framework - 实体框架 4 POCO 实体在单独的程序集中,动态数据网站?
基本上我想使用动态数据网站来维护 EF4 模型中的数据,其中实体位于它们自己的程序集中。模型和上下文在另一个程序集中。
我试过这个Entity Framework 4 + Self-Tracking Entities + ASP.NET Dynamic Data = Error
但从反射中得到一个“模糊匹配”错误:
System.Reflection.AmbiguousMatchException 未被用户代码 Message=Ambiguous match found 处理。Source=mscorlib StackTrace:在 System.RuntimeType.GetPropertyImpl(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) at System.Type.GetProperty(String name) at System.Web.DynamicData .ModelProviders.EFTableProvider..ctor(EFDataModelProvider dataModel, EntitySet entitySet, EntityType entityType, Type entityClrType, Type parentEntityClrType, Type rootEntityClrType, String name) 在 System.Web.DynamicData.ModelProviders.EFDataModelProvider.CreateTableProvider(EntitySet entitySet, EntityType entityType) 在 System .Web.DynamicData.ModelProviders.EFDataModelProvider..ctor(对象上下文实例,Func1 contextFactory)
at System.Web.DynamicData.ModelProviders.SchemaCreator.CreateDataModel(Object contextInstance, Func
1 contextFactory) 在 System.Web.DynamicData.MetaModel.RegisterContext(Func`1 contextFactory, ContextConfiguration configuration) 在 C:\dev\Puffin\Puffin.Prototype.Web\Global.asax 中的 WebApplication1.Global.RegisterRoutes(RouteCollection routes)。 c:\dev\Puffin\Puffin.Prototype.Web\Global.asax.cs 中 WebApplication1.Global.Application_Start(Object sender, EventArgs e) 的第 42 行:第 78 行 InnerException:
linq-to-sql - 脚手架动态数据页面上缺少表格
我第一次创建了一个 Linq-to-SQL DBML。我将所有表格拖放到设计师那里。这些表都出现在designer.cs 文件中。在 Global.asax 中,我还有 model.RegisterContext() 和 ScaffoldAllTables = true 选项。路线也设置好了。
我可以调出 Scaffolding 页面,但至少有一张桌子丢失了,我正试图显示出来。这个缺失的表与引用它的子表有关系。出现子表。查看子表的数据时,引用缺失/父表的列显示数字 PK int 值,而不是显示“名称”。因此,不是显示“汽车”而是显示 1,而不是显示“飞机”而是显示 2,等等。
数据库中有另一个表与丢失的表具有相同类型的结构,并且它正确地出现在脚手架表中。
对于这个丢失的表,我尝试显式添加 ScaffoldTable 属性无济于事。
有谁知道什么会导致这样的表格不出现在脚手架表格列表中?非常感谢。
linq - 动态数据关联相关表值?
我在 Visual Studio 2010 中使用动态数据创建了一个 LINQ-to-SQL 项目。在这个项目中,我有两张桌子。一个称为phones_extension,另一个称为phones_ten。phone_extension 中的列列表如下所示:id、extension、prefix、did_flag、len、ten_id、restriction_class_id、sfc_id、name_display、building_id、floor、room、phone_id、department_id 在phones_ten 中它看起来像这样:id、name、pbxid 现在,我希望能够以某种方式做到这一点,以便有一个关联(或继承?),这基本上导致我能够进行像phones_extension.ten这样的查询,它给了我phones_ten.name的结果。现在我必须得到phones_extension.ten_id,然后将它与phones_ten.id 匹配——我试图让DBML 自动处理这个翻译。这可能吗?
asp.net-dynamic-data - 控制单个项目的编辑、删除
有没有办法在列表控件中显示时使用实体上的属性启用/禁用单个实体实例的编辑和删除?
asp.net - ASP.NET 动态数据和上传文件
我正在开发一个小型的仅供内部使用的 Web 应用程序。鉴于其简单的性质和目标受众,我认为这可能是一个使用 ASP.NET 动态数据项目快速启动和运行的好机会。到目前为止一切顺利,除了一个让我重新考虑整个计划的问题:
我需要能够通过网站上传文件。模型中有一个实体表示上传的文件。该实体具有文件内容、文件名和文件内容类型的属性。上传文件时,所有这些值都是从单个FileUpload
控件中获取的。
由于 aFieldTemplate
与实体属性具有一对一的关联,因此我决定需要EntityTemplate
为 File 实体创建一个自定义。此时,我已经为具有FileUpload
控件的实体创建了一个“编辑”模板。我无法弄清楚的是,当用户单击“更新”链接时,我如何将FileUpload
控件中的数据获取回实体并(最终)进入数据库。
非常感谢任何建议或指导。
asp.net - 带有 Asp.Net 动态数据的密码字段
我有一个要与动态数据一起使用的用户表。问题是我有需要使用 MD5 加密的密码字段。我正在使用实体框架,我该怎么做?