dynamic-data

Dynamic background-image on body (ASP.NET)

半城伤御伤魂 提交于 2019-12-17 23:35:12
问题 I have a situation where I have ~10-20 different background images in a folder. When my site loads I need to choose a specific one of these images based upon some values from the database. I thought about using runat=server on the body tag, and then adding the attributes dynamically on page_load, but everywhere I have read that suggestion people say it is a really bad idea... Also, I tried it, and it didn't work (however didn't debug it too much). How would one do this "the right way" ? :-)

Why am I receiving an error about Delphi incompatible types (array and dynamic array)?

二次信任 提交于 2019-12-17 20:52:15
问题 ( EDIT : This is following on from Are objects reference counted in Windows-targeted Delphi applications, and if so, what is its purpose? and Dynamic arrays and memory management in Delphi). I have two classes ( TGenericHoldingSummary , TGenericHoldingResultSet ) and one record ( TGenericHoldingResult ). TGenericHoldingSummary contains a single TGenericHoldingResultSet , which is set to nil and lazy-loaded from the database if and when required. The TGenericHoldingResultSet contains a dynamic

Why no variable size array in stack?

为君一笑 提交于 2019-12-17 09:39:53
问题 I don't really understand why I can't have a variable size array on the stack, so something like foo(int n) { int a[n]; } As I understand the stack(-segment) of part of the data-segment and thus it is not of "constant size". 回答1: Variable Length Arrays(VLA) are not allowed in C++ as per the C++ standard. Many compilers including gcc support them as a compiler extension, but it is important to note that any code that uses such an extension is non portable. C++ provides std::vector for

getElementsByClassName not working [duplicate]

我们两清 提交于 2019-12-17 04:01:17
问题 This question already has answers here : What do querySelectorAll and getElementsBy* methods return? (9 answers) Closed 5 years ago . I coded a php page that displays information from a mysql database neatly into tables. I would like to hide empty table rows with an onLoad event handler. Here is a sample table with code that hides a <td> when it has no content. but i can only get it to work with different IDs: <script type="text/javascript"> function hideTd(id){ if(document.getElementById(id)

How to design these two tables?

亡梦爱人 提交于 2019-12-14 03:36:23
问题 I want to build an application that allows a user to build its own form(s). A user can input data into its form and query the data too. The form can be edited after being created and used ( add/remove fields from it ). The form can have small text box, big text box, single list, check box, or a drop down menu. I've been reading and asking around about which approach is better for building this kind of databases and I got no straight/good answer. I read that in this kind of application, the

…is not a foreign key column and cannot be used here?

妖精的绣舞 提交于 2019-12-14 03:01:16
问题 I have two views in SQL, and have created mappings to them in Linq to SQL. The two views have an association, which works fine, between Ticket.ProblemCode and Problem.Code When I try to set UIHint("ForeignKey") on Ticket.ProblemCode and run the web page I get the error: 'ProblemCode' is not a foreign key column and cannot be used here. Anyone know why? More importantly, how to fix it? 回答1: See this post on the ASP.NET forums: http://forums.asp.net/t/1254559.aspx Also, you said that you

How can we get DynamicData working with EFPocoAdapter?

微笑、不失礼 提交于 2019-12-14 02:03:46
问题 My team is hoping to use the EFPocoAdapter, but are also hoping to use the DynamicData tools with it but are having some issues. We basically added a "Dynamic Data Entities Web Application" project to the EFPocoAdapter Northwind sample solution (I am using the latest version, 1.03), referenced the needed assemblies and then uncommented and edited the line in the Global.asax.cs file that registers a context with the MetaModel to look like this: model.RegisterContext(typeof(NorthwindEF

Want to fetch data from database based on dropdown list selection using php [duplicate]

天涯浪子 提交于 2019-12-13 08:06:43
问题 This question already has answers here : Can I mix MySQL APIs in PHP? (4 answers) Closed 3 years ago . I have a php file and mysql database with fields named planname and price,and i want a dropdown list of all the planname from database and according to the planname the price of particular planname should be shown in text box below. Here is my php file; <?php $servername = xxxxxxx; $username = xxxxxx; $password = xxxxxx"; try { $conn = new PDO("mysql:host=$servername;dbname=vnet", $username,

Automatically set a property value for a new record in a Dynamic Data application

喜你入骨 提交于 2019-12-13 05:14:08
问题 I have a SalesOrderItem table, and it has a UnitPrice column in case the salesperson wishes to override the unit price of the Product for that order item. In an ASP.NET Dynamic Data application, what would be the best way to set that UnitPrice property on a new SalesOrderItem based on the standard UnitPrice for the product? In other words, when the user clicks New on the 'Items' screen for a sales order, the UnitPrice field should already be filled in with the normal unit price for the

How do I make a ManyToMany_Insert template for EF Dynamic Data?

假如想象 提交于 2019-12-13 03:35:38
问题 I'm extremely new to Dynamic Data, but I'll fire this off anyway. I have an EF model set up, with a PJT table linking Shows and Genres. The EDMX correctly displays this as a * - * relationship between Shows and Genres, with navigation properties. Using Dynamic Data, I can create a Show item, but then only once it is created, can I edit it to link up the Genres (which are nicely displayed as check boxes). I've read this http://blogs.msdn.com/b/davidebb/archive/2008/10/25/a-many-to-many-field