471,605 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

bind GUI elements to xml

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
Dec 13 '05 #1
1 2217
Sharon wrote:
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
Dec 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by P G | last post: by
6 posts views Thread by Andreas Thiele | last post: by
7 posts views Thread by Dan | last post: by
4 posts views Thread by Greg Linwood | last post: by
reply views Thread by cipcip | last post: by
1 post views Thread by cipcip | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.