|
I want to convert object to Array List but stuck how to do.
Actually I am doing this because I am passing argument of an array this array is contains some panels.
When I pass these panels to another form it copy the references of panels. Any thing changes in child form(in panels ) affect the father form panels.
Here is the code.
object obj = array.Clone();
Now the object become object array but there is no technique to convert this obj to object[].
If you have any suggestion to overcome my problem to not copy the references of the array(panels) .
You are most welcome if you give any suggestion.
|
|
|
|
|
Naveed khan nido wrote: but there is no technique to convert this obj to object[].
object[] obj = (object[])obj
|
|
|
|
|
Thanks for giving the technique to convert object to object array.
But after cloning I have facing the same problem. Can you help me regards this.
Thanks
|
|
|
|
|
Cloning the array won't help solve your problem - the array will get cloned, not the elements in the array. The panel objects will still be shared.
You can deep clone i.e. clone the panels themselves. What are you trying to do though?
|
|
|
|
|
yes you are right.
It is still coping the references.
The thing I am doing is that I have an array of panels and these panels have some Labels and Picture Boxes. Now I am going to create an another form and need a copy of these panels and the objects that panels contains.
In another form it will further changes(i,e Labels or Pic Boxes) that changes should not made to Parent Form.
So what should I do. Can you give me an example of deep clone. How should solve my problem.
thanks for reply.
|
|
|
|
|
You could write a function that will do the deep clone for you...
|
|
|
|
|
Just a thought.
You might be better off converting these panels into custom controls. That way you can create the second form by just dropping the custom control in.
Then create a class or struct with fields for the information from form 1, instantiate the class/struct with the data from form 1 and pass it to second form whre data gets inserted into custom control.
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
I would like to print the crystal report in the local printer instead of printing in default web server printer.
|
|
|
|
|
It's a setting. Ask your network-administrator
I are troll
|
|
|
|
|
I am doing one application in windows form in C# .net.
i have created two forms. but if i run the studio, its defaulting the first form. but i want my second form to open first. how to change that property?
waiting for your reply.
|
|
|
|
|
Hema Bairavan wrote: i have created two forms. but if i run the studio, its defaulting the first form. but i want my second form to open first. how to change that property?
Open Program.cs , check the following method is ther
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
The line which I have bold , check that line . In your code its is
something like
Application.Run(new Form2 ())
So change it accordingly
|
|
|
|
|
Hi Hema Bairavan,
You need to change in program.cs file
Application.Run(new Form2());
nJoy
Pavan Pareta
|
|
|
|
|
Thanks to pavan and abhijit,
its working fine
|
|
|
|
|
Hi ,
Please help me for this i am tring a lot to get out of it but did not find solution.
I am using .net 2005 asp.net. In my code i use update panel and modal popup.And though i have alerady set Trigger properly following error is comming.
Sys.WebForms.PageRequestManagerParserException: The message received from the server could not be parsed. Common causes for thies error are when response.write(),response filters ,Httpmodules,or server trace is enabled. Details:Error parsing near '<html><head><scrip'.
like this.And this error is comming only at my client side and only for the one employee not for any other.
I am not able to reproduce this error at my end so how can i fix this error?
Please help me for this.
|
|
|
|
|
Hello everyone,
Is there any open source .Net open source content management platform like Sharepoint?
thanks in advance,
George
|
|
|
|
|
This[^]. BTW, what your question has to do with C#?
|
|
|
|
|
Thanks Navaneeth,
It is C# related because I am asking open source content management platform based on .Net technologies.
regards,
George
|
|
|
|
|
I will suggest you to Try DNN (DotNetNuke ) . Its Simply Great
|
|
|
|
|
Cool, thanks Abhijit!
regards,
George
|
|
|
|
|
|
Cool, Abhijit!
I like it.
regards,
George
|
|
|
|
|
|
Thanks Hamid,
What I want is to have open source developed based on C#.
regards,
George
|
|
|
|
|
It was good source for it and you can search for them on the Net.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Thanks Hamid!
regards,
George
|
|
|
|