bind GUI elements to xml

S

Sharon

hi all
I have a small application assembled from
C# winForm client side (few of them)
C# webService at the server side

I'm using xml file to transfer the GUI information from client to server
For Example in the client window there are 3 text box's and one button
Text boxes are "first num" , " second num" and "sum"
And "calc" button

So when the user click the "calc" button , the winForm window send the GUI
xml to the server , and the server parses the xml file and fill in the
records

Xml example :

<Gui_items>
<item>
<textbox name="first
num">30</textbox>
</item>
<item>
<textbox name="second
num">50</textbox>
</item>
<item>
<textbox
name="sum"></textbox>
</item>
</Gui_items>

the server response will be :

<Gui_items>
<item>
<textbox name="first
num">30</textbox>
</item>
<item>
<textbox name="second
num">50</textbox>
</item>
<item>
<textbox
name="sum">80</textbox>
</item>
</Gui_items>

Then the winForm client get the response XML and parses it ,
All GUI item's are filed in to the GUI controls

This only simple example, the real client window is much complex,
I'm using labels and label's color changing

Currently I'm parsing the XML file using System.Xml
Is there any way I can bind the GUI elements to this XML and make it easier
for me to develop it ?
Is there any way I can use dataset's and have the same goal ?

Please post any comment you have
Thank you very much

Sharon
 
C

Chris

Sharon said:
hi all
I have a small application assembled from
C# winForm client side (few of them)
C# webService at the server side

I'm using xml file to transfer the GUI information from client to server
For Example in the client window there are 3 text box's and one button
Text boxes are "first num" , " second num" and "sum"
And "calc" button

So when the user click the "calc" button , the winForm window send the GUI
xml to the server , and the server parses the xml file and fill in the
records

Xml example :

<Gui_items>
<item>
<textbox name="first
num">30</textbox>
</item>
<item>
<textbox name="second
num">50</textbox>
</item>
<item>
<textbox
name="sum"></textbox>
</item>
</Gui_items>

the server response will be :

<Gui_items>
<item>
<textbox name="first
num">30</textbox>
</item>
<item>
<textbox name="second
num">50</textbox>
</item>
<item>
<textbox
name="sum">80</textbox>
</item>
</Gui_items>

Then the winForm client get the response XML and parses it ,
All GUI item's are filed in to the GUI controls

This only simple example, the real client window is much complex,
I'm using labels and label's color changing

Currently I'm parsing the XML file using System.Xml
Is there any way I can bind the GUI elements to this XML and make it easier
for me to develop it ?
Is there any way I can use dataset's and have the same goal ?

Please post any comment you have
Thank you very much

Sharon

If I remember correctly, you can pass object through a web service. So
why not make a business object, load it up with the information pass it
over. This will remove the overhead of the xml processing as well as
the xml overhead text.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top