Click here to Skip to main content
15,918,007 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Referece Access Programatically Pin
ChandraRam12-Dec-06 1:20
ChandraRam12-Dec-06 1:20 
AnswerRe: Referece Access Programatically Pin
Guffa11-Dec-06 14:56
Guffa11-Dec-06 14:56 
GeneralRe: Referece Access Programatically Pin
J. Sebby12-Dec-06 5:41
J. Sebby12-Dec-06 5:41 
QuestionArraySubType in Structure Pin
VFaul11-Dec-06 9:27
VFaul11-Dec-06 9:27 
QuestionCombo Box in VB.Net Pin
valiro11-Dec-06 4:38
valiro11-Dec-06 4:38 
AnswerRe: Combo Box in VB.Net Pin
Christian Graus11-Dec-06 8:36
protectorChristian Graus11-Dec-06 8:36 
GeneralRe: Combo Box in VB.Net Pin
valiro11-Dec-06 10:06
valiro11-Dec-06 10:06 
QuestionHow I can get xsi:nil="true" in XMLElement? Pin
voladu11-Dec-06 1:06
voladu11-Dec-06 1:06 
Hi!

Im working with VS2003 — VB.Net. I stuck with problem. When i apply serialization for my class, i cant get element with 2 attrib: one attribute as null (xsi:nil="true") and another - valuable.

Like this : <IndTaxNum ROWNUM="1" xsi:nil="true" />

My code:

' piece of class for serialization
Public Class DBody
' .....................
<System.Xml.Serialization.XmlElementAttribute("IndTaxNum", _
Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, _
IsNullable:=True)> _
Public IndTaxNum() As IndTaxNumColumn
'.....................
End Class

' type IndTaxNumColumn declare

Public Class IndTaxNumColumn
<System.Xml.Serialization.XmlAttributeAttribute()> _
Public ROWNUM As Integer

<System.Xml.Serialization.XmlTextAttribute()> _
Public Value As String
End Class

XML document use for saving table. Not all variables Value have meaning (some of their Nullable).

<IndTaxNum ROWNUM="1" xsi:nil="true" />
<IndTaxNum ROWNUM="2">345453<IndTaxNum/>
<IndTaxNum ROWNUM="3" xsi:nil="true" />
<IndTaxNum ROWNUM="4">767567<IndTaxNum/>
.................

However if set in code:
Value = System.DBNull.Value.ToString or
Value = Nothing or
Value = String.Empty
generating &#8212;
<IndTaxNum ROWNUM="1" />

if dont insert value to array IndTaxNumColumn -
<IndTaxNum xsi:nil="true" />

So, what i must set for that result:
<IndTaxNum ROWNUM="1" xsi:nil="true" /> ?

thank you!
Questionuser control calendar (asp.net) Pin
gocap11-Dec-06 1:02
gocap11-Dec-06 1:02 
AnswerRe: user control calendar (asp.net) Pin
Christian Graus11-Dec-06 8:51
protectorChristian Graus11-Dec-06 8:51 
QuestionIterate through Registry Pin
Mark0611-Dec-06 0:24
Mark0611-Dec-06 0:24 
AnswerRe: Iterate through Registry Pin
Robert Rohde11-Dec-06 1:25
Robert Rohde11-Dec-06 1:25 
Questionprinter option in vb 6.0 Pin
rrrriiizz10-Dec-06 21:43
rrrriiizz10-Dec-06 21:43 
AnswerRe: printer option in vb 6.0 Pin
Amit Kushwaha13-Dec-06 2:20
Amit Kushwaha13-Dec-06 2:20 
QuestionAscii code Pin
Amr M. K.10-Dec-06 20:22
Amr M. K.10-Dec-06 20:22 
AnswerRe: Ascii code Pin
The ANZAC10-Dec-06 20:56
The ANZAC10-Dec-06 20:56 
AnswerRe: Ascii code Pin
CPallini10-Dec-06 22:32
mveCPallini10-Dec-06 22:32 
AnswerRe: Ascii code Pin
Uber111-Dec-06 0:05
Uber111-Dec-06 0:05 
QuestionCheckbox Pin
The ANZAC10-Dec-06 10:21
The ANZAC10-Dec-06 10:21 
AnswerRe: Checkbox Pin
Guffa10-Dec-06 11:39
Guffa10-Dec-06 11:39 
GeneralRe: Checkbox Pin
The ANZAC10-Dec-06 17:59
The ANZAC10-Dec-06 17:59 
GeneralRe: Checkbox Pin
Guffa10-Dec-06 18:15
Guffa10-Dec-06 18:15 
GeneralRe: Checkbox [modified] Pin
The ANZAC10-Dec-06 20:23
The ANZAC10-Dec-06 20:23 
QuestionScrolling textbox over MaxLength limit Pin
pc1chang10-Dec-06 6:50
pc1chang10-Dec-06 6:50 
AnswerRe: Scrolling textbox over MaxLength limit Pin
nlarson1111-Dec-06 3:49
nlarson1111-Dec-06 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.