hey guys,
I'm very excited about the dynamic features in C# (C#4 dynamic keyword - why not?), especially because in certain Library parts of my code I use a lot of reflection.
My question is twofold:
1. does "dynamic" replace Generics, as in the case below?
Generics method:
public static void Do_Something_If_Object_Not_Null<SomeType...
This is the code below in code behind file's Page_Load event:
LinkButton linkButton = new LinkButton();
linkButton.ID = "LinkButtonDynamicInPlaceHolder1Id" + i;
linkButton.ForeColor = Color.Blue;
linkButton.Font.Bold = true;
linkButton.Font.Size = 14;
linkButton.Font.Underline = false;
...
code:
LinkButton linkButton = new LinkButton();
linkButton.OnClientClick="changecolor";--i need to change this to on mouse focus event
there is no property for for link button like we have onClientClick.
...
I'm dynamically adding a Boolean column to a DataSet. The DataSet's table is the DataSource for a GridView, which AutoGenerates the columns.
Issue: The checkboxes for this dynamically generated column are all disabled. How can I enable them?
ds.Tables["Transactions"].Columns.Add("Retry", typeof(System.Boolean));
ds.Tables["Transactions...
Should dynamic asp.net controls be avoided at all costs?
In what situations should they be used?
What do you use as their replacement?
...
based on the solution here: http://stackoverflow.com/questions/827175/entering-values-into-database-from-unlimited-dynamic-controls
i could successfully create dynamic asp.net controls at runtime. so if the user enters 10, it displays 10 textboxes and if the user enters 50 it displays 50. so far it's good. but 50 textboxes would make th...
I'm trying to add plugins to my program, and this looks good, except that I can't cast the correct type from the dll.
I Have a solution with several projects on it.
One of the project is a country Layer, that actually holds a CountryBase (defined as public abstract class CountryBase : CountryLayers.ICountryBase )
The Interface (public i...
Hello,
I am currently working on a VB.NET desktop application that uses .mdb (Access) database files on the backend. The .mdb files are opened and edited in the VB.NET app. Once editing is completed, the users will need to import the data into our SQL Server database. This is an easy task, until you try to introduce the dynamic filepat...
I'd like the stored procedure to return a list of data, just like what "select" do. But the PHP/MySql engine my hosting service does not support that feature. The only output parameter I can provide is primitive types, like int, varchar and so on.
So I tried to combine the whole list into one big string with the help from cursor.
But ...
Doing node/%/lightbox2 would do it, but I can't figure out how to make a dynamic link to the node!
Ideally, each node will have a thumbnail, and that thumbnail will trigger the lightbox2-viewed node
...
Doesn’t the dynamic ports keep changing? If yes, wont these ports change and communication stop? Please advice.
...
i have set enableviewstate property of linkbutton and label to true.also regenrating same buttons on postback in pageload event handler.but m not able to call onclick event handler of linkbutton.can u please tell me what is problem with code?
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sende...
What is the best way to assemble a dynamic WHERE clause to a LINQ statement?
I have several dozen checkboxes on a form and am passing them back as: Dictionary<string, List<string>> (Dictionary<fieldName,List<values>>) to my LINQ query.
public IOrderedQueryable<ProductDetail> GetProductList(string productGroupName, string productTypeNa...
Hello, I have to create several vbox-es in a for each loop.
Now I want to do something like this.
formsArray["vb"+counter] = new VBox;
formsArray["vb"+counter].visible = true;
add labels etc.
I can't get this thing to work. Anybody any idea how to create dynamic variable names for my vbox-es?
Thanks
...
Due to politics at the very large finanial institution for which I work, I am not able to use Castle Project's ActiveRecord implementation, but like the pattern so much I have implemented it myself. This is complete, and now management is looking for a GUI tool to browse all the activerecord classes, search for instances and manage data....
Because of some business decisions I need to change a bit of what I was doing. Yay me. :)
Currently, I have:
public IOrderedQueryable<ProductDetail> GetProductList(string productGroupName, string productTypeName, Dictionary<string,List<string>> filterDictionary)
{
string whereClause = "ProductGroupName='" + productGroupName + "' ...
I've been reading a book about Scala and there's mention of stackable modifications using traits. What are stackable modifications and for what purposes are they meant to be used?
...
I wish to load some additional data from javascript in an HTML page. The solution below is small and does exactly what I need to do in non-Microsoft browsers.
Question is, what is the Microsoft explorer equivalent?
Note that the data I'm loading isn't in XML. I also do not wish to add a javascript library - I want this page to load fas...
I have to create a website in asp.net with C#.
And the requirement is.. According to the user type ( like Admin, Manager, User) the Menu Should be different and it should change dynamically. I have done this before by creating different pages( for admin, manager, user) depending on the user but this time the controls should load dynamic...
How can i reference a class property knowing only a string?
class Foo
{
public $bar;
public function TestFoobar()
{
$this->foobar('bar');
}
public function foobar($string)
{
echo $this->$$string; //doesn't work
}
}
what is the correct way to eval the string?
...