dynamic

ASP.NET and dynamic Pages.

Is it possible to write a System.Web.UI.Page and stored in an assembly? And how can I make iis call that page? So I will go deeply... I'm writing a class like that: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using Syste...

How can I read a dynamically created textbox

I create some dynamic textbox's and a button in a placeholder and would like to save info in textbox's when button is clicked but not sure how to retrieve data from the textbox LiteralControl spacediv3 = new LiteralControl("&nbsp&nbsp"); Label lblComText = new Label(); lblComTitle.Text = "Comment"; TextBox txtComment = new TextBox(); t...

Handling a C# method that isn't defined on a dynamic object (aka respond_to/method_missing)

Given the new dynamic support in C# 4, is it possible to write a class in such a way that if a method is invoked on an instance and that method is not present, dispatch is passed to another method? This might look something like: public class Apple : ... { // ... private ... MethodMissing(string name, ...) { if (name == "TurnIn...

How to slideToggle table row using Jquery?

Hello, I was wondering how I can slideToggle a table row from my script. I have a php file that is included in an html page inside a div called 'output-listings'. PHP FILE: <?php function outputListingsTable() { $mysql = new mysqli('localhost', 'root', 'root', 'ajax_demo') or die('you\'re dead'); $result = $mysql->query("SE...

The Current State Of Serving a PHP 5.x App on the Apache, LightTPD & Nginx Web Servers?

Being stuck in a MS stack architecture/development position for the last year and a half has prevented me from staying on top of the world of open source stack based web servers recent evolution more than I would have liked to. However I am now building an open source stack based application/system architecture and sadly I do not have th...

TApplicationEvents as dynamic component or static for tracing called routine in Delphi.

Hello and good morning! Unfortunately I am not writing this question from my Developing PC so I might do some mistakes. Please sorry about it... So - my question - what approach you use to implement error logging in your application? In web ( http://delphi.about.com ) is nice event handler, but it just copies system error in file, but ...

Dynamic button control in AJAX

I create a button control and it shows up, but when clicked event does not fire, not sure if it could be because control gets greated after previous event in AJAX which fires fine. Should only get executed once. Any ideas would be appreciated, thanks. Button btnCommentSave = new Button(); btnCommentSave.ID = "mySavebtn...

How do I dynamically create functions that are accessible in a parent scope?

Here is an example: function ChildF() { #Creating new function dynamically $DynFEx = @" function DynF() { "Hello DynF" } "@ Invoke-Expression $DynFEx #Calling in ChildF scope Works DynF } ChildF #Calling in parent scope doesn't. It doesn't exist here DynF I was wondering whether you could define DynF in such a way...

Dynamic Type Conversion C#

I have the following method public static void SerializeToXMLFile(Object obj,Type type, string fileName) { XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns.Add("", ""); XmlSerializer serializer = new XmlSerializer(type); TextWriter tw = new StreamWriter(fileName); serializer.Serialize(tw, obj, ns); ...

How to load openssl.so dynamic library in PHP 5.2.1

Hello, I recently installed MAMP version 1.6 on my MAC OS 10.5.7. Now I am running a script to connect to a site using ssl. After some research, I added the following line to my php.ini(under the extensions part) extension=openssl.so However When I reestart my Apache server I get this Warning: [15-Jul-2009 16:30:39] PHP Warning: PH...

What is the .Net equivalent of Java's Dynamic Proxies?

In java it's possible to dynamically implement an interface using a dynamic proxy, something like this: public static <T> T createProxy(InvocationHandler invocationHandler, Class<T> anInterface) { if (!anInterface.isInterface()) { throw new IllegalArgumentException("Supplied interface must be an interface!"); } retur...

Dynamically added DataTemplate - StaticResource for Converter can't be found

Hi, I'm using the following code to dynamically add columns to my GridView: public void AddGridViewColumns() { GridView view = (GridView)_myListView.View; GridViewColumn column = BuildGridViewColumn(1); view.Columns.Add(column); } public virtual GridViewColumn BuildGridViewColumn(int blockIndex) { string templateXaml = ...

Make a for loop with an aray and variable

I am using the code below to draw an object to the stage. However I want to be able to redraw the object every time I press ENTER in my onEnterframe function. So I have to add the draw function again but with a new array. Also every time I push enter the value of the variables in the array should increase. Here's the initial code: maat...

Linking Qt in a dynamic library

Hi, I have a dynamic library that works fine, and I would like to use a QObject in it. After including the "qobject.h" header, I compile adn evrything is fine. But when I try declaring a QObject, the compiler always gives me a "identifier not found" error. I tried foward eclaration of the QObject class, it did not help. It's weird becaus...

Dynamic control creation in WPF

I'm working on a project where I have some hierarchical data that I want to be able edit through a fancy WPF control. The data structure is essentially an expression tree. Each node can be a different Expression type but inheriting from the same base class. These different types need to have their own way of editing them. My thoughts ...

MVVM - Where should I put code that dynamically generates and loads XAML?

Hi, I guess this is sort of a philosophical question, but I have some code that dynamically adds templated columns to a GridView by generating the XAML at runtime from Model data and loading it using XamlReader. My question is, In an MVVM world, where should I put the code that accomplishes this? At the moment, I have it in the codebehin...

Javascript: calculating number of columns of a dynamically sized textarea

I've got an HTML textarea whose width is set to 100% of the browser window, using CSS. How can I calculate how many columns of text fit within the textarea? ...

Howto dynamically render space background in actionscript3?

I'm creating a space game in actionscript/flex 3 (flash). The world is infinitely big, because there are no maps. For this to work I need to dynamically (programatically) render the background, which has to look like open space. To make the world feel real and to make certain places look different than others, I must be able to add filt...

Is it possible to configure a GridView to show pivoted data using static XAML if column info is unknown at design time?

Hi, I was recently, um, chastised for generating and loading XAML markup at runtime using XamlReader.Parse(). I was told that there's no reason to use XamlReader--it can always be done with static XAML, predetermined at design time. I attempted to ask this person how I could construct a GridView to show pivoted data, where the number of...

jQuery dynamic creation of input fields based on the number selected in a dropdown menu?

I am trying to accomplish something along the lines of this: http://devblog.jasonhuck.com/assets/infiniteformrows.html But... I want to display a dropdown select field, with values 1 to 20, and depending on which value gets selected in that field that's how many input fields I will display to a user to fill out on the page (without ref...