473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

returning and binding xml to a web control

I had a great post with great responses on the topic and it disappeared
when I removed my last response in an attempt to clarrify a question...

somewhat noob here.

Will I be able to bind a web control to class object that returns xml?
and if so, how does one return xml from a method. Here's my missguided
attempt..

public class test
{
public static ???XmlCharacterData??? Gogetit(string name)
{
string conn = "Data
Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirecto ry|\\xx.mdf;Integrated
Security=True;User Instance=True";
using (SqlConnection connection = new SqlConnection(conn))
{
connection.Open();
SqlCommand cmd = new SqlCommand("select * from book2 for
xml path", connection);
cmd.CommandType = CommandType.Text;
XmlReader xr = cmd.ExecuteXmlReader();
xr.MoveToContent();
return(xr.ReadOuterXml());

}

Thanks for any help or information. If you have a simple working
example, that would be awesome!

Sep 22 '06 #1
0 910

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ann Morris | last post by:
INTRODUCTION One of the most powerful aspects of .NET and Windows Forms is data binding. Data binding is the process of associating user interface (UI) elements with a data source to generate a...
0
by: Wesman | last post by:
Why does the following code not work (displays the correct values in the second textbox). if i chane the OnFocusChange method to the following it will work: private void OnFocusChange(object...
0
by: Simon Barbour | last post by:
Hi all, Tearing my hair out on this one so hopefully somebody can help. I have written a custom control to represent a button on a touchscreen EPoS (electronic point of sale) peice of...
4
by: Larry Grady | last post by:
Anyone up for a challenge? I've been struggling with this for a few days and was hoping someone could help me. Pouring through all the messageboards I just can't find the solution. We have a...
11
by: Rourke Eleven | last post by:
I have looked and searched. What good is the databind property on Radiobuttons? How does one go about actually using it? What is a good resource on this? I understand that I can easily get/set...
19
by: Simon Verona | last post by:
I'm not sure if I'm going down the correct route... I have a class which exposes a number of properties of an object (in this case the object represents a customer). Can I then use this...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
2
by: Joe | last post by:
I'm binding to a column in a TemplateField. In some cases the join I have returns a null for an int field. I would like to specify a default value somehow so I don't end up with a null exception. ...
5
by: =?Utf-8?B?V29ua28gdGhlIFNhbmU=?= | last post by:
Hello, I have a custom control (not a listbox or other hierarchical or list control) that I would like to bind to a specific row and column from a DataTable. Each row of the datatable will...
1
by: GS | last post by:
I am perplexed . I thought it is easy to fix the binding error on cvtDtFrom. I only used the cvtDtFrom a couple of places but I found out the error occurred before form loading. I tried...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.