dynamic

initialize a class by string variable in c#?

Hi, is it possible to initialize a class by a string variable? I have code in PHP. <?php $classname = "test"; $oTest = new $classname(); class test{ } ?> how do I do this in c#? ...

ASP.NET MVC: creating controls dynamically

This is the control builder class... public class ControlBuilder { /// <summary> /// Html Control class for controlbuilder Control . /// </summary> protected HTMLControl formControl; /// <summary> /// Html Control class for the label. /// </summary> private HTMLControl labelControl; /// <summary> ...

jquery with dynamic template div rows building

ok i have a site which has many different templates with different htmls for each template. i want to know how can i render for each row for its section with paging dynamically with jquery? i dont want to store html in a var, because it changes with template and i want to make it easy for designer without needing to know jquery code. s...

Javascript Dynamic Grouping

I am trying to create a table, with some grouping headers. All is well when i have 1 group, but how do i create dynamic groups? This is what i have so far (for 1 group): var groupby = ''; arrdata.each(function(element){ if (groupby != element.groupby) { groupby = element.groupby; tbody.push(groupby) } tbody.push(e...

GridView Sort and Paging broken on User Control inside ajax tab container using lazy load?

Hello and Good Day I have a system that uses custom user controls for the information displayed on an ajax tabcontainer. I have finally gotten the lazy load of the user controls to work using triggers and placeholders to dynamically load the user control only the first time the user clicks on the respective tab. The issue I am facing ...

How to dynamically change ConverterParameter (or any) property of a MultiBinding (or any other) resource at runtime?

Hi. i'm new to wpf and xaml. i find solutions of most of the problems (in other languages) by searching here n there or googling around but this one made me crazy. i searched a lot on google and browsed many forums, but it seems that this time i met with a real challenge! I have following code in Window.Resources: <my:NameConverter x:K...

SQL flattening & dynamic query question

Firstly, I am not certain this is the best way to handle this AT ALL ... totally open to alternative solutions. Secondly, I feel like I'm missing the obvious ... but I'm still missing it so not to proud to ask! UPDATE: .NET 3.5 environment w/ SQL 2005, so things like dynamic linq possible, although I always tend to think of dynamic (bu...

Base-to-derived class typecast

I have a base class: class RedBlackTreeNode { // Interface is the same as the implementation public: RedBlackTreeNode* left; RedBlackTreeNode* right; RedBlackTreeNode* parent; Color color; TreeNodeData* data; RedBlackTreeNode(): left(0), right(0), parent(0), color(Black), ...

Getting static property from a class with dynamic class name in PHP

Hi Guys, I have this: one string variable which holds the class name ($classname) one string variable with holds the property name ($propertyname) I want to get that property from that class, the problem is, the property is static and I don't know how to do that. If the property weren't static, it would have been: $classname->$pro...

xRM - CRM Platform

As Microsoft is trying to leverage xRM as a development Platform for LOB applications. Some of my clients start requesting applications to be developed on top of that platform. I still need to know the right conditions where this platform will work and when the need arise to work in native .net environment so that i can convince my cli...

Dynamically updating part of a page for all users

I want to dynamically updating a part of a web page for all users on it when I chose to (through a seperate page). The scenario I'm thinking of: Say there's a chat box and a picture on a page. When I click a button on another page (or the same), the picture changes to an embedded youtube video for all users on the page chatting. Wha...

MySQL use column names from another table

I'm wondering if it is possible to return a result set with column names which are stored in a separate table. Is this possible or do I need a stored_procedure with variables. See link for mysql_dump and description of required resultset: http://pastie.org/584865 ...

determine size of dynamically allocated memory in c

Is there a way in c to find out the size of dynamically allocated memory? For e.g., Suppose I say char* p = malloc(sizeof(char)*100); Now is there a way to find out the size of memory associated with p? ...

Dynamic WPF geographical map display usercontrol

I am designing an application where I basically want to load geographical maps that are defined using paths (outlines of countries). The Maps should be displayed on my Window and when I hover each country on the map, it should change color. I managed to do this partially by exporting an svg map to xaml and including this xaml in a cust...

Dynamic Scoped Resources in WPF/XAML?

I have 2 Xaml files, one containing a DataTemplate which has a resource definition for an Image brush, and the other containing a content control which presents this DataTemplate. The data template is bound to a view model class. Everything seems to work EXCEPT the ImageBrush resource, which just shows up white... Any ideas? File 1: D...

How to access a dynamically created text box in C# whose name is available in string ?

I have a dynamically created (runtime creation) textbox whose name is available as a string.What i want to do is access this textbox like we do as normal textboxes .Can any one tell me how to cast it as textbox or any other solution ...

Dynamically Load a user control (ascx) in a asp.net website

Hi, I am trying to dynamically load a user control in an asp.web site. However due to how asp.net websites projects are setup (I think), I am not able to access reach the type definition of the user control. I get a message saying that my class HE_ContentTop_WebControl1 is: he type or namespace name 'HE_ContentTop_WebControl1' could no...

jqGrid dynamic select option

I'm creating a jqgrid with drop down columns and I'm using cell editing. I need the options of the drop down columns to change dynamically and I've tried implementing this by setting the column to be: { name: "AccountLookup", index: "AccountLookup", width: 90, editable: true, resizable: true, edittype: "select", formatter: "select" }, ...

How do I build up LINQ dynamically

I have a scenario where I have custom configured column names, associated operators like < > = between etc. and then a value associated. I'm trying to determine if it is possible to build up a LINQ query with a dynamic (string) where clause? I've noticed the Predicate.OR Preditcate.AND stuff, but that is not quite what I'm talking abou...

Flash 8 Actionscript - Stage.height

I am building a complete site using OOP AS2. I want to be able to change the size of the flash window (the stage) according to the "page" that the script is currently showing. In other words, different pages will have different hieghts and I will need the browser scrollbar to act accordingly. Must javascript be used? ...