|
Use command:
aspnet_iisreg -i
to install .net framework to your iis server.
I'm amumu, and you?
|
|
|
|
|
Thank you all for your input. It turned out that I did have ASP.NET install or so I thought. I did windows update before and already downloaded and installed the .NET Framework. I then install IIS which does not pick up the .NET Framework. Thanks to you guys, I just reinstall ASP.NET and IIS finally picked it up and it's working great now.
Thanks
|
|
|
|
|
I have a custom treeview class with a couple of extra properties and methods. When I try to serialize an object of that type, I get a compiler error saying that TreeView has not been marked as serializable. Any suggestions as to how I can serialize this object?
Any help would be greatly appreciated.
|
|
|
|
|
If you implement ISerializable you can control how the serialization happens; so that instead of serializing a TreeView; you serialize the parts you need to recreate it (ie the nodes, and your custom property).
If the nodes aren't serializable, you'll have to do something special with them too.
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
I gave up on serializing the treeview, instead I just made a class with the same properties and meathod as before. The class has one extra property: a TreeNode. It is essentially just a root node for everything that would have been in the treeview.
I implemented ISerializable like you said, and it serializes and deserializes perfectly except when the TreeNode has any other nodes in it (doh!). Do you know how I can get around this?
Thanks for the help,
Steve
|
|
|
|
|
One more thing I thought of. I could recurse through the nodes. I would have to first serialize all the 'sub'nodes then clear and serialize the node itself. My problem then is: How do I deserialize them?
|
|
|
|
|
All you should have to do is Serialize the root node; it should then serialize everything referenced in that node; including its child nodes.
When you deserialize only worry about the first node; the rest should come with it.
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
Try running this (and look at the y and z definitions):
using System.IO;
using System.Runtime;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Serialization.Formatters.Binary;
.
.
.
TreeNode x,y,z;
x = new TreeNode("Root");
y = x.Nodes.Add("A"); //it only runs if you comment out these lines
z = y.Nodes.Add("1"); //it only runs if you comment out these lines
IFormatter formatter = new BinaryFormatter();
Stream mystream = new FileStream("MyFile.bin", FileMode.Create, FileAccess.Write, FileShare.None);
formatter.Serialize(mystream, x);
mystream.Close();
TreeNode root;
mystream = new FileStream("MyFile.bin", FileMode.Open, FileAccess.Read, FileShare.Read);
root = (TreeNode)formatter.Deserialize(mystream);
MessageBox.Show(root.Text);
Thanks for the help
|
|
|
|
|
Has anyone had any luck getting TAPI to work with C#? I'm running into some fairly strange problems.
I added the Telephony class to my toolbox, then dragged an XTel object to my form. Then I added a button. Here's the method I attached to the buttons click event:
private void callButtonClick(object sender, System.EventArgs e)
{
axPhone.ChooseEngineDialog();
axPhone.CallDialog();
}
Everything compiles fine and comes up. Then I click the button and I get the Speech Engines for the Telephone dialog box. COOL. The next thing I should see would be the Call Dialog but instead I get an error:
System.NullReferenceException: Object reference not set to an instance of an object.
huh?
Some things I can do. I can set the AnswerAfterRings property and I can get the MaxLines property. However if I try the MakeCall() method directly I get the NullReferenceException again.
I did a search for TAPI here and found S.S. Ahmed's VB Tapi program, and that works fine for me.
I'm sooooooooooo confused.
|
|
|
|
|
I want to put a bitmap file as a resource, then load it into a varialbe, so that it can be set as a forms background. but this has two problems.
1. I dont have the luxury of the vs.net resource editor [i use SharpDevelop]
2. I dont know how to load it from resource.
any help plz?
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
I'm a little tired right now, but back when we were having the screensaver contest I was reviewing JTJ and CG's source for their entry. They did that, here is the link to their article, you will need to download it and read through the file. Your answer somewhere in here
Nick Parker
|
|
|
|
|
I don't know how you would do it in SharpDevelop; but on the commandline you can add bitmap resources.
csc [other options] /resource:mybitmap.bmp,mynamespace.othergarbage.mybitmap.bmp
To load that bitmap at runtime you need to first understand how the resource loading Bitmap constructor works.
Bitmap(Type namespace, string filename);
It takes an instance of a Type, and a filename. The only thing that the Type is used for is to get the namespace of that type; it then prepends the filename with it.
So if you passed in an instance of a Type for the class MyCompany.Foo, and a filename of "whatup.bmp" the bitmap it will look for will be named "MyCompany.whatup.bmp", this name is what the second part of the /resource compiler option does.
Understanding how this works is by far the trickiest part to learn; and I haven't learned how to explain it in plain english yet
HTH,
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
|
I don't suppose anyone knows of an HTTPS class? I know /n software have got their IP*Works library (which includes an HTTPS module amongst others) but I only want the HTTPS support, and it seems prohibitively expensive!
Alternatively, I guess I'm going to have to knuckle down and write my own lol
Thanks,
Paul
|
|
|
|
|
Hy guys, I try to build e Toolbar for IE with this example:
http://www.codeproject.com/csharp/dotnetbandobjects.asp
I would like to insert a textbox but when I press backspace don't delete the character.
Why?
Please help me
|
|
|
|
|
It's because IE uses that to navigate backward. I still haven't found an answer.
http://www.knowledgegeek.com - Come on! I need the Traffic!
|
|
|
|
|
Hi all, can someone please post an example of how to use the FlagsAttribute, specifically setting and unsetting the flags?
My code:
[Flags]
public enum StringFormat
{
Normal = 1,
Bold = 2,
Underline = 4,
Inverse = 8,
Color = 16,
}
In my class:
StringFormat format = StringFormat.Normal;
format = format | StringFormat.Bold;
What operators is needed to unset, for example, Bold? In the MSDN documentation they they have a Match() method. How does one use that?
Thanking all in advance
Cheers
READ MSDN
|
|
|
|
|
Since you are using powers of 2, the OR instruction is just like an ADD instruction. Therefore can't you just subtract?
I don't know how to make it display combinations... perhaps overriding ToString()?
Later,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Thx, thats exactly what i have now ended up doing, though it requires casting all members to int and then do the add, then cast back to enum type. Seems a bit like defeating the point thought The only thin that seems to work like I want it to is checking whether a flag is active by:
if ((format & StringFormat.Bold) == 0) etc...
to test for example if Bold is active.
Or maybe I'm just missing the point completely
Thx anyways
READ MSDN
|
|
|
|
|
Subtracting works, however it is nasty and generally not the way that you want to unset a flag. If you know that the Bold flag is set then you can use this to get rid of it.
<br />
format = format ^ StringFormat.Bold<br />
Note that this will toggle the Bold flag not erase it. So if it is set then it will unset it.
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
Thx
jparsons wrote:
Note that this will toggle the Bold flag not erase it. So if it is set then it will unset it.
So if Bold is set "^" will unset it , and if Bold is unset "^" will set it?
READ MSDN
|
|
|
|
|
|
You can unset by doing:
format = format & (0xFFFFFFFF ^ StringFormat.Bold);
The second expression gives you a vector with every bit set except the bold one, and then when you and that with format, you're assured that it's cleared.
If you have [Flags] on the enum, when you call ToString() on it, you'll get a comma-separated list of the set bits.
|
|
|
|
|
thx all , at least i can progress on one area. Just to recap.
to unset: format = format & (0xFFFFFFFF ^ StringFormat.Bold);
to set: format = format | StringFormat.Bold;
Thanx again all
Now if only that damned richtextbox will start behaving
READ MSDN
|
|
|
|
|
Hi all,
I encounter 2 following issues with PropertyGird:
1. Adding a NumericUpDown control into a PropertyGrid.
2. I cannot show a property which is not a enumeration type under a ComboBox in PropertyGrid.
Please help me to solve these issues. Thanks.
|
|
|
|