|
thank you for your help, i'll give it a try
|
|
|
|
|
As an afterthought, did they/you perhaps mean XAML?
Then your UI would be based on SL.
modified on Thursday, January 21, 2010 2:58 PM
|
|
|
|
|
requesters only mentioned XML, but of course i can use any methode that lead to a successful result
thanks
|
|
|
|
|
Dear Estys,
i just finished applying the method you provided, i faced a little problem,
it's while i'm loading,i'm also populating the radioButtonlist from a datatble, the RadiobuttonList is created using the xslt file,so an error is shoing to all using controls in the Default.aspx.cs file is "the name 'control's ID' does not exist in the current context"
so how could i use controls in this context?
thank you again for your help.
|
|
|
|
|
Hi,
I think I've read about it before butnow I'm needing it, I can't find anything about it.
How can I specify the xml deserialization order? Let me give an example. Imagine I have 3 parts in my class "School": classes, professors and students. I need to deserialize the following order (classes->professors->students) no matter how they are written in the xml.
Thanks in advance.
|
|
|
|
|
Mehdi_S wrote: How can I specify the xml deserialization order?
By specifying the Order using the XmlElement attribute, similar to this;
public class OrderedClass
{
private int field1;
private string field2;
private string field3;
[XmlElement(Order = 3)]
public string Field3
{
get { return field3; }
set { field3 = value; }
}
[XmlElement(Order = 1)]
public int Field1
{
get { return field1; }
set { field1 = value; }
}
[XmlElement(Order = 2)]
public string Field2
{
get { return field2; }
set { field2 = value; }
}
public OrderedClass()
{
field1 = 1;
field2 = "String1";
field3 = "String2";
}
}
The example is taken from MSDN[^], where you can download a sample application[^].
Good luck
I are Troll
|
|
|
|
|
Thanks a lot. that helps much. just anaother question related to the same topic: knowing that I can define the set of types that a set can contains, can I specify the order of types deserialization. For example, I have the classes student and professor that inherit from the class person.
the class persons contains the following set
[xmlarrayitem("Student", typeof(Student)),xmlarrayitem("Professor", typeof(Professor))]
[xmlarray("PersonsSet")]
public Person[] PersonsSet
{
get;set;
}
How can I specify that the professor elements has to be all deserealized before the student elements no matter how they are ordered in the xml document.
Thanks in advance.
|
|
|
|
|
Mehdi_S wrote: How can I specify that the professor elements has to be all deserealized before the student elements no matter how they are ordered in the xml document.
Taking your example; there's a difference in getting an order in the properties and getting an order in the items within the collection. You can change the order of the properties by adding those tags to the Person class. The collection would be serialized using that information.
Implementing ISerializable [^] or even IXmlSerializable [^] would be more appropriate for complexer structures. That way you can control the order of the properties and the data. There's a really nice CodeProject article on IXmlSerializable here[^].
Good luck
I are Troll
|
|
|
|
|
Hi I'm Creating a DLL File "Fr6Customise.dll" and Code is
Imports System
Namespace Fr6Customise
Public Class LoadModule
Public Shared Function ViewModule() As Boolean
Return True
End Function
End Class
End Namespace
----------------------------------------
Now I am using that dll in my project whenever needed...
Dim CAssembly As Assembly = Assembly.LoadFrom(My.Application.Info.DirectoryPath & "\" & "FR6Customise.dll")
Dim scriptType As Type = CAssembly.GetType("Fr6Customise. LoadModule")
Dim mi As MethodInfo = scriptType.GetMethod("ViewModule")
But, when I am using this Code scriptType always return Nothing. There is any error found in this Code.
How Can I Solevd It. Pl, Help me.
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
...
Dim scriptType As Type = CAssembly.GetType("Fr6Customise.Fr6Customise.LoadModule")
....
That works for me, it's the fullname of the type
|
|
|
|
|
No, its Return "Nothing"
Can You Just Email me Your Code.My Email ID : webarindam@gmail.com
Arindam Banerjee
Sr. Software Developer
Rance Computer Pvt Ltd.
Kolkata (India)
|
|
|
|
|
Look in your application properties (of Fr6Customize)
The value of your "Root namespace" is the root of the fullname of your Type.
To see all types add the following line :
Dim types() as Type = CAssembly.GetTypes()
Set a breakpoint after this line and add a watch.
BTW just nitpicking, your code
CAssembly.GetType("Fr6Customise. LoadModule") has a space in the name.
no luck mailing my code : "reason: 552-5.7.0 Our system detected an illegal attachment on your message."
modified on Tuesday, January 19, 2010 9:05 AM
|
|
|
|
|
I'm working on an "add-on enabled" application where assemblies are deployed (copied / uploaded) to a server (and a reference added to a database) making the add-on available to the user. To set the standards of the add-on I've created a separate library with the interface definitions that I can even send to 3rd party vendors.
Problem comes when I try to instantiate the uploaded assembly and cast the instance back to my interface definition. My test add-on is 2 dll's, one for the add-on and one for the interface definition which I put together in the same folder, the instance is created correctly and I can get the public attributes with reflection but the instance type is object and cannot be cast to my interface type.
Any ideas? I have played around with different ways to load the assembly file but it does not seem to make a difference...
If I check if the Interface is implemented on the Type it is (assemb.GetTypes().Where(t => t.GetInterface("MyInterface") != null).FirstOrDefault() ), but I suspect that the problem is that its checking by name...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
This is something similar, perhaps it will give you some ideas. Application Suite Template[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi Mark,
Thanks for the post. I cannot get the code to run (only have VS 2010 B2) installed, but the architecture is quite different to what I'm using. I'm using an interface that I share between 2 different projects, 1 being the application and 1 being the addon. What you are doing with Activator.CreateInstance I have also tried and I experienced to problems described...
I can quite easily get an instance of a class in an assembly, and the instance class will be based on my interface that I shared, yet I cannot cast my instance to the interface...
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
|
Why not take a look into the Managed Extensebility Framework (MEF)? It's very powerful (clickety[^]).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I looked at MEF and I just couldn't understand the mecahnism. Another chap at my work looked at it and couldn't figure it out either...
I'm confused at a high and a low technical level, but all the examples I get shows you how easy it is, and over the years I have grown petrified of things that looks way easy in an example...
Apart from the link above (which I'll have another look at), do you have some advanced samples that shows the workings?
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Sacha Barber has an excellent sample here[^].
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I have a problem.I have made a digital dairy compromising of three forms.The first form gives an intro to dairy, the second form contains text boxes of "name","phone number", "email id",etc and the third form re-displays this info in labels and asks user if they want to save data as it is or want to edit it.In case the user clicks edit form two is opened if one chooses save form 1 opens.The problem with me is that my frm displays the last saved information instead of displaying empty text boxes when chosen "new" button from form one.Help me!!!!!!!!!!!!!!
|
|
|
|
|
emma watson wrote: The problem with me is that my frm displays the last saved information instead of displaying empty text boxes when chosen "new" button from form one.
You could clear the values of the different controls in your editForm_Load. How does the form load it's data? Can you paste the code where you load the data, and the code that's behind the "New"-button?
I are Troll
|
|
|
|
|
Hi,
Though i am a non-Technical person.A software developer of my company(Mindfire Solutions) has done an analysis on VB.net.Please visit the following links.
http://www.mindfiresolutions.com/VBNET-104.php[^]VBDOT net.
Cheers,
Eliza
Mindfire: India's Only Company to be both Apple Premier & Microsoft Gold certified.
|
|
|
|
|
Hi All,
I want to develop an 3D Image rendering software using DIRECTX which can perform some 3D Operations.My customer wants the software developed on .Net Framework.
I have experience in coding in MFC in VC6.0.If i develop an application in MFC dialog based application in Visual Studio 2008,will it be built on .Net Framework?
Also,i have done some image processing coding in C++.Basically i have some classes defined in .h and .cpp files which i want to include in the .Net application which i am going to develop.
For the above requirements should i go for VC++.Net(Forms based developed in VS 2008) application or VC++(MFC based developed in VS 2008)?
Please advice.
Thanks ,
Ashwath.
|
|
|
|
|
ashwath1979 wrote: If i develop an application in MFC dialog based application in Visual Studio 2008,will it be built on .Net Framework?
You shouldn't even have to ask this question! Of course MFC is not .NET !!!
You can use your C++ code in .NET by using PInvoke and creating an interop library to your functions.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What are you suggesting - that the acceptable base level of knowledge is your own? Anyone who knows less is somehow deficient, stupid or both? It's a perfectly legitimate question from someone who does not know the answer. That's why people ask questions - so they can learn from people who know a little more.
Please be a bit more respectful towards those whose knowledge is different to yours.
|
|
|
|