.net-2.0

visual basic 2005 & mySQL

do u need to download something for VB2005 to connect to a mySQL db? cant connect to mysql db? any suggestions? ...

Is there some Gui component I can use to allow users to create connection strings?

I have an client app which will use a connection string to get access to some data. I need the administrators to be able to define the connection string that the clients will use. I would like to give them a wizard similar to the one that is used to define a new ODBC data source, but don't want to write all of this functionality myself...

get object type and assign values accordingly

I have an arraylist that gets different type of values in it, 1st value->string,2nd value-> datetime, 3rd value--> boolean and 4th value is int, how do I find thier type and assign those values accordingly, any help is appreciated:) here is my Code: foreach (object obj in lstTop) { if(obj.GetType() == string...

What's the best way to serialize / deserialize a Dictionary<String,String> in .Net 2.0?

I need to be able to serialize / deserialize a Dictionary to a human-readable (and if it comes down to it, human-editable) string (XML or Json preferably). I only need to work with String dictionaries, not other object types of any kind. The strings, however, are presumed to be free text, so they can have characters like single/double q...

How can I read all elements in a plain XML using XMLReader in .Net 2.0?

I have the following XML: <XMLDictionary> <a>b</a> <c>d</c> <e>f</e> </XMLDictionary> I'm trying to get the mappings a: b, c: d, e: f, and I can't quite find how to do it simply. My current code looks like this: Do While reader.Read() If reader.NodeType = Xml.XmlNodeType.Element Then Me.Add(reader.Name, reader.ReadElemen...

Will implementing IXMLSerializable create a serializer DLL file in my Temp directory?

Normally, when using the XMLSerializer to automagically serialize an ISerializable object, a .dll file is generated on C:\WINDOWS\Temp. If I implement IXMLSerializable instead, where I'm telling it how to serialize / deserialize, will it also generate this DLL? I have a very simple class to serialize, and I'm trying to avoid this automa...

Removing obsolete WebProxy.GetDefaultProxy() references

I have a bit of code which is annoying me because it is generating obsolete warnings, but I am wary of removing it because : a) I works b) I didn't write it c) I don't currently have a means of testing it. (Ie I don't have access to a machine where it is required) The code is as follows System.Net.WebProxy proxyObject = System.Net...

How do i force VS.net in designer mode on a class?

Short backstory: My UI code uses tabs heavly and as time progresses and features get added the .cs file that has the tab controls is getting big and hard to maintain and i came up with a what i think is a clever way around this. When i create tab page its new class that are inheriting the TabPage, and therefor in its own .cs file. Now t...

resources in VB2005.net?

In short my program plays a random embedded audio file when a timer runs out, is there a way to refer to the my.resources files as an array and use them that way rather than needing to know the exact file name of the resource? ...

How this Generic Inheritance is done (internally) ?

Hi, How do you think the following code? Is this good? If so, why it is? If not, why it is not? And how CLR see this code? public abstract class EntityBase<TEntity> : IEquatable<TEntity> { public bool Equals(TEntity other) { // check equalitiy } // yes, below is object's Equals and GetHashCode method ...

Implement a parent-child class hierarchy

I'm finding it difficult to find a decent example on how to implement a parent-child hierarchy class. I have a treeView control that I want to convert into a class hierarchy, adding extra data to each node and be able to easely iterate over each parent's nodes using IEnumerable. public IEnumerable<Node> GetAllChildsFromParent(Node paren...

How to recognize the JavaScript method(function)

I am writing a Plug-In for VS2008 and I would like to recognize the JavaScript method(function). I have a file - sample.js:` function test0() { var i = 0; { var j = 0; } var array = { 1: 2, dd: 10, aaa: 3 }; return array; } function test1() { ...

Table adapters datetime null value

Hi All, My SQL database has a a column in a table that has the datatype of datetime and allows nulls (because I need it to either be a datetime value or blank) and I need to be able to read this value and then display it in a textbox. The problem is that on inserting and updating, the autogenerated tableadapter (when dragged from the se...

Why is this WMI query hanging on the second time it's called?

The following WMI query throws an exception at serverProtocolsManagement.Get() when sqlHost is an invalid server name (as expected. However, if I try to invoke this code again with the same invalid parameter, the ManagementScope constructor hangs indefinitely (never returns or throws an error, just hangs). Is there a reasonable explanati...

Choosing which Service Pack of the .Net Framework to build against

I have read many questions (and answers) around here that had similar sounding terms in them as this question, but all of them ended up being about building against different major versions of .Net. I am in much deeper trouble, unfortunately. Here is the story. Our customers use version 2.0 of the .Net framework. Just 2.0, no service pa...

How and where to learn the changes in .net from .net 2.0 to .net 3.5?

I left the .net about 3 years back when I was working on .net 2.0. And in these three years I wasn't working on .net at all. Now, I have got a project which is in .net 3.5. But I have noticed there are a lot of technologies introduced between these two versions. Is there any resource which can help me to quickly grasp the things which a...

.Net Service and Windows App at the same time?

When you create a Windwows Service, you end up with a .exe file that you need to register, and you start it from the "Services" snap-in. If you try to execute this .exe file, you get the message: "Cannot start service from the command line or debugger. A Windows Service must first be installed (using installutil.exe) and then started wi...

i want to write a code where after saving the file by savefile dialog and then editing it again to save the savedialog box should not appear

i can save a file using savefiledialog . once the file is saved and if we edit it and then save it again then it should be saved without opening the savefiledialog.please help me with the code. This code is made in Visual Studio 2005 in Windows forms. using System; using System.Collections.Generic; using System.ComponentModel; using Sy...

How to enable/disable web elements of a parent aspx page from the child ascx page?

I have an aspx page with three web controls: one to control the List Users page, one to control the Edit Users page, and one to control the Add User page. I have discovered a method for accessing these elements, but it seems to be limited. Here is what I have done: Protected Sub editUser(ByVal sender As Object, ByVal e As System.Web...

What event is called when a .ascx control is set to visible? How can it be handled?

If I set a .ascx control's visible attribute to true, what event is called? What method can I create in that control's codebehind to act on this event? Thanks :) ...