dynamic-data

ASP.NET Dynamic Data TextSearch Custom Filter Template

≯℡__Kan透↙ 提交于 2019-11-30 03:44:03
问题 I'm trying to implement a custom filter template for all text based searches and running into problems constructing the query. I've been following the instructions posted on this blog but not sure how change the GetQueryable method to perform a WHERE columnAttribute LIKE '%something%' query. In the example on the blog the expression is an equality which works if the text I enter exactly matches the text in the database column. At the moment I'm using the new QueryExtender feature along with

Dynamically Adding Elements and trying to use the selectors .click event Jquery

岁酱吖の 提交于 2019-11-29 17:53:36
I'm trying to dynamically add elements and have click listeners for them in JQuery. For whatever reason the removeGroup event does not get set off when I click on an elements 'remove' button. Any help would be great, thanks. $('.removeGroup').click(function(event){ alert(); }); cartPopper.click(function(event){ $('#selectedGroupList').find('.selected').remove(); for(group in selectedGroups) { var group_id = selectedGroups[group]; var name = $('.' + group_id).text(); $('#selectedGroupList') .append ( '<li style="font-size:20px" class="selected ' + group_id + '">' + '<a href="javascript: void(0)

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

狂风中的少年 提交于 2019-11-29 11:02:03
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 } 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 Method1(false); } What should the type be here? A simpler example: var Method1(bool throwException) { if (

Hide a column in ASP.NET Dynamic Data

北战南征 提交于 2019-11-29 06:01:19
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 :-) Had no idea what ASP.NET Dynamic Data was so you promted me to so some research :) Looks like the property you are looking for is [ScaffoldColumn(false)] There is also a similar property for tables [ScaffoldTable(false)]

How can I dynamically add an <object> tag with JavaScript in IE?

心不动则不痛 提交于 2019-11-29 02:39:54
I have to add either an embed tag for Firefox or an object tag for Internet Explorer with JavaScript to address the appropriate ActiveX / Plugin depending on the browser. The plugin could be missing and needs to get downloaded in this case. The dynamically added embed tag for Firefox works as expected. The dynamically added object tag for Internet Explorer seems to do nothing at all. The object tag needs the following attributes to function properly. id ="SomeId" classid = "CLSID:{GUID}" codebase = "http://www.MyActicexSource.com/MyCuteActivex.CAB#Version=2,0,0,1" Even a general working idea

Creating a dynamic table with PHP

耗尽温柔 提交于 2019-11-29 02:33:16
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='400px' /></td>"; } ?> </table> The get_all_pics() function: $all_pics_q="SELECT * FROM pics"; $all

Abstract: Should I choose ASP.Net MVC over Web Forms or [closed]

坚强是说给别人听的谎言 提交于 2019-11-29 01:19:46
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I've been working with web for over 7 yrs and I've upgraded from html->ASP->ASP.Net and now the new flavors of ASP.Net itself. I was to begin with MVC last year but due to deadline and the complexity involved in MVC I couldn't. Now, once again there's a new upgrade - I've

Dynamic background-image on body (ASP.NET)

谁都会走 提交于 2019-11-28 21:29:14
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" ? :-) You Can Either dynamically add it via a Generic HTML control: using System.Web.UI.HtmlControls;

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

纵然是瞬间 提交于 2019-11-28 13:52:26
( 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 array of TGenericHoldingResult records. In the below, the error is at the assignment in the

Is there a way to let cURL wait until the page's dynamic updates are done?

℡╲_俬逩灬. 提交于 2019-11-28 12:11:10
I'm fetching pages with cURL in PHP. Everything works fine, but I'm fetching some parts of the page that are calculated with JavaScript a fraction after the page is loaded. cURL already send the page's source back to my PHP script before the JavaScript calculations are done, thus resulting in wrong end-results. The calculations on the site are fetched by AJAX, so I can't reproduce that calculation in an easy way. Also I have no access to the target-page's code, so I can't tweak that target-page to fit my (cURL) fetching needs. Is there any way I can tell cURL to wait until all dynamic traffic