dynamic-data

App_Code folder is missing in VS 2010

回眸只為那壹抹淺笑 提交于 2019-11-28 07:10:41
I was trying to create a Dynamic Data Website using VS 2010 RC. An attempt to create an App_Code folder where I would put a LINQ to SQL class, failed. When I selected 'Add ASP.NET Folder' to add the folder, I had options to create only the following folders: App_GlobalResources App_LocalResources App_Data App_Browsers Theme What happened to the App_Code folder? Why not create another project, a class library, and put it in there. That's by far the best way to keep those classes separate from the rest of your website. To answer your specific question about the App_Code folder, it's available in

Dynamic Form Generation in ASP.NET

百般思念 提交于 2019-11-28 07:03:47
I would like to dynamically generate a form from a database in ASP.NET, what is the best approach? Are there any built in functionalities I can use? I will have database tables to represent the panels and their names, then for each panels, it contains the different fields and their types (Combos, Textboxes, etc..). Please advice, thank you. Note: I have to use Telerik Ajax controls for the form generation Have a look at Dynamic Data . I recently found out about it and it's already saved me a lot of time. Update: Apologies - having reread the question, I don't think this is what you were after.

How to catch that map panning and zoom are really finished?

北战南征 提交于 2019-11-28 05:08:00
I am trying to write an application that will dynamically load data to map while user pans or zooms it. I need to track when the map is finished to change its view state (stops panning or zooming) and then load a new portion of data for creating markers. But in fact Google Maps API doesn't have any events to handle this. There are some methods like creating an empty overlay to control onTouch events and so on, but map panning could last long after user finished his touch because GMaps use some kind of inertia to make the pan smoother. I tried to subclass MapView but its draw() method is final

Why is it not possible to declare a function with VAR return type?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 04:13:44
问题 In C#, we have var data type but we can't use it as functions return type. Why this is not possible? public var myFunction() { var = some operations } 回答1: I believe it's partly due to the design of the compiler. Eric Lippert blogged about why fields can't use implicit typing, and I suspect some of the same arguments hold for methods. But you could easily end up with ambiguity anyway. For example: var Method1(bool callMethod2) { return callMethod2 ? Method2() : null; } var Method2() { return

Dynamic (Runtime Generated) Forms in ASP.NET MVC [closed]

社会主义新天地 提交于 2019-11-28 03:09:31
This is a general design question: How would you implement a dynamic (runtime generated) form in ASP.NET MVC? Here's the situation: A site admin can define form parameters (fields, type of fields, validation) with a GUI (MVC view). As needed, the runtime generates the form for the end user based on the admin configuration. I'm assuming that all of this logic would reside in the controller - or perhaps extension methods, action filters or something like that. End user fills out the form, hits submit, information is captured in database. The customization does not need to support nested controls

Hide Page Extensions (Like StackOverflow)

安稳与你 提交于 2019-11-28 02:12:36
I want to hide page extensions like stackoverflow does. How does the following work? http://stackoverflow.com/tags/foo http://stackoverflow.com/tags/bar I've seen a lot of sites that do this, but I still don't know how this is accomplished (I have a LAMP stack). When a web server gets a request for a URL, it has to decide how to handle it. The classic method was to map the head of the URL to a directory in the file system, then let the rest of the URL navigate to a file in the filesystem. As a result, URLs had file extensions. But there's no need to do it that way, and most new web frameworks

Hide a column in ASP.NET Dynamic Data

放肆的年华 提交于 2019-11-27 23:32:49
问题 Is there any way to apply an attribute to a model file in ASP.NET Dynamic Data to hide the column? For instance, I can currently set the display name of a column like this: [DisplayName("Last name")] public object Last_name { get; set; } Is there a similar way to hide a column? Edit : Many thanks to Christian Hagelid for going the extra mile and giving a spot-on answer :-) 回答1: Had no idea what ASP.NET Dynamic Data was so you promted me to so some research :) Looks like the property you are

Why no variable size array in stack?

独自空忆成欢 提交于 2019-11-27 21:15:37
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". 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 implementing a similar functionality as VLA . There was a proposal to introduce Variable Length Arrays in C++11, but

Creating a dynamic table with PHP

冷暖自知 提交于 2019-11-27 16:52:39
问题 I'm trying to make a dynamic table with PHP. I have a page which displays all the pictures from a database. I need the table to be of 5 columns only. If more than 5 pictures are returned, it should create a new row and the displaying of the rest of the pics would continue. Can anyone please help? Codes go here: Code in the main page:- <table> <?php $all_pics_rs=get_all_pics(); while($pic_info=mysql_fetch_array($all_pics_rs)){ echo "<td><img src='".$pic_info['picture']."' height='300px' width=

AngularJS dynamic form from json data (different types)

喜你入骨 提交于 2019-11-27 11:35:35
I try to create a dynamic form in AngularJS using the data from a JSON. I have this working: HTML <p ng-repeat="field in formFields"> <input dynamic-name="field.name" type="{{ field.type }}" placeholder="{{ field.name }}" ng-model="field.value" required > <span ng-show="myForm.{{field.name}}.$dirty && myForm.{{field.name}}.$error.required">Required!</span> <span ng-show="myForm.{{field.name}}.$dirty && myForm.{{field.name}}.$error.email">Not email!</span> </p> <button ng-disabled="myForm.$invalid">Submit</button> </form> JS angular.module('angularTestingApp').controller('DynamicFormCtrl',