Just a quick one, if you want to store an image to a dataset, and are creating the dataset in code, here’s the proper type:
System.Type.GetType(“System.Byte[]“)
It’s a little confusing because if you use Visual Studio’s XSD editor, it lists the type as System.Byte(). And of course System.Byte would compile but it would not behave as expected.
In the schema, the type is stored as: type=”xs:base64Binary”
My application is a blend between a web app and an actual windows form application. You can either access the web app or the windows form app. A few of the more complex features are only available to you if you run the windows form app.
To share features between the two, I just embedded a web browser control on a tab, and I have it bring up the web application.
Everything has always worked great, until I upgraded a test machine to IE7. Turns out all of my dropdown boxes (select tags) inside the application’s web browser control stopped working.
So, to recap, my dropdowns work in IE7, IE6, Firefox, but they don’t work inside my application which is using IE7’s Web Browser Control.
I found the offending piece of code that I had to remove. We were doing a little style to the select boxes when you clicked on them, apparently this version of IE7 did not like it.
Offending Code:
function colorChanger(obj)
{
if (obj.style.backgroundColor == '#f00')
{
return true;
}
else
{
if (obj.style.backgroundColor == '')
{
obj.style.backgroundColor = "#eeeeee";
}
else
{
obj.style.backgroundColor=(obj.style.backgroundColor=="#ffffff"?"#eeeeee":"#ffffff");
}
}
}
I’ve done a little of this in the past, and I’m about to do it today. Each time I have to look it up, so in hopes of finding it a little quicker or maybe remembering how this time, I’ll post it here.
_
Public Class MyObject
Implements ISerializable
Public n1 As Integer
Public n2 As Integer
Public str As String
Public Sub New()
End Sub
Protected Sub New(ByVal info As SerializationInfo, _
ByVal context As StreamingContext)
n1 = info.GetInt32("i")
n2 = info.GetInt32("j")
str = info.GetString("k")
End Sub 'New
_
Public Overridable Sub GetObjectData(ByVal info As _
SerializationInfo, ByVal context As StreamingContext)
info.AddValue("i", n1)
info.AddValue("j", n2)
info.AddValue("k", str)
End Sub
End Class