|
by: gt |
last post by:
I am trying to replicate the functionality of
DataTextField/DataValueFields in an extended DropDownList control that
I have created in order to provide a third value for each ListItem.
This value will be stored in a client-side array currently as that is
where it is required. Now to the problem.
I've overriden the DataBind Method of my DropDownList and within it
have added the code below:
Type DataSourceType =...
|
by: Oskar Lundgren |
last post by:
I want to iterate over fields declared like this, using reflection
(and there are good reasons for that):
Protected WithEvents Foo1 As Bar
Protected WithEvents Foo2 As Bar
....
I use the following code to get an array containing the fields
(wrapped in PropertyInfo objects):
|
by: Charles Law |
last post by:
I have adapted the following code from the MSDN help for PropertyInfo
SetValue. In the original code, the structure MyStructure is defined as a
class MyProperty, and it works as expected. There is also a minor change in
class Mypropertyinfo, which I have commented out.
When using a structure, however, the second call to GetValue returns
"Default caption". Can anyone tell me why, and how I can make this work?
<code>
Imports System
|
by: Paul |
last post by:
I'd like to iterate through the controls on pages within a dll. I can get a
page's Controls in a PropertyInfo class but can't extract the
ControlsCollection from there.
Dim asm As = asm.GetExecutingAssembly
Dim oType As Type
For Each oType In asm.GetTypes
If oType.BaseType.ToString() = "System.Web.UI.Page" Then
|
by: INeedADip |
last post by:
PropertyInfo props = obj.GetType().GetProperties();
foreach (PropertyInfo p in props)
if (p.PropertyType is ValueType)
this._commonProperties.Add(p.Name, p.GetValue(request,
null).ToString());
I get a warning that says p.PropertyType will never be ValueType....and it
was right.
After stepping through it the types are "System.Boolean" etc...
I want to add all integer, string, and boolean types to NameValueCollection,
|
|
by: SyZLaB |
last post by:
I had a problem using system.reflection.propertyinfo.getvalue in vb -
and searched a lots of newsgroups and libraries - but none had the
solution to my problem - and it also seamed like many others had the
same problem: system.reflection.propertyinfo.getValue fails with
"Object does not match target type."
As many of the posts where to old to answer, here's the "solution" :
The obj parameter is the object from where propertyinfo gets the...
|
by: Carlos Rodriguez |
last post by:
I have the following function in C#public void Undo(IDesignerHost host)
{
if (!this.componentName.Equals(string.Empty) && (this.member != null))
{
IContainer container1 = (IContainer)
host.GetService(typeof(IContainer));
IComponent component1 =
container1.Components;
PropertyInfo info1 =
component1.GetType().GetProperty(this.member.Name);
|
by: Tom Dacon |
last post by:
I'm using Reflection to iterate over the properties and fields of an
arbitrary object. For non-indexed properties it's
pi.GetValue(theObject, Nothing) for VB, or pi.GetValue(theObject, null)
for C#
For indexed properties, instead of Nothing (null) you pass an array of index
values.
OK, no problem so far.
|
by: samueltilden |
last post by:
I am writing a very generic DumpObject(object Obj) method.
I can easily GetType() and GetType().GetProperties().
I can easily PropertyInfo.GetValue(Obj, null) for scalar variables.
The problem is arrays or collections which require this syntax:
PropertyInfo.GetValue(Object, Object index)
|
by: damiensawyer |
last post by:
Hi,
I need to invoke .getvalue and .setvalue on fieldinfo and propetyinfo
objects. Even though they're both derived from MemberInfo, they don't
share those two methods. I've finding myself writing the following
types of structure over and over. Is there something I'm missing? Or
some 'funky' 3.5 delegate/lambda expression way of doing this?
Thanks very much in advance,
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|