Click here to Skip to main content
16,007,885 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sending Files Pin
Not Active13-Feb-04 9:58
mentorNot Active13-Feb-04 9:58 
GeneralRe: Sending Files Pin
David_cole13-Feb-04 22:53
David_cole13-Feb-04 22:53 
GeneralIP Retrieval Pin
David_cole13-Feb-04 9:29
David_cole13-Feb-04 9:29 
GeneralRe: IP Retrieval Pin
Kentamanos13-Feb-04 10:43
Kentamanos13-Feb-04 10:43 
GeneralRe: IP Retrieval Pin
HAHAHA_NEXT16-Feb-04 7:57
HAHAHA_NEXT16-Feb-04 7:57 
GeneralHandling Task Switching Pin
raysot77713-Feb-04 9:16
raysot77713-Feb-04 9:16 
GeneralRe: Handling Task Switching Pin
Heath Stewart13-Feb-04 12:38
protectorHeath Stewart13-Feb-04 12:38 
Generalxml in windows forms Pin
rasarit1713-Feb-04 8:43
rasarit1713-Feb-04 8:43 
How do I put a string into a xml file in a windows application, in a window form? I use a DataReader and not a dataset.

the code looks like this:
I have a XmlDocument myXml
............
string sqlString=" SELECT NumeMat,NumeCD,durata, nrstud "+
" FROM materii AS m, corpdidactic AS cd, activitate as a"+
" WHERE m.IDMat = a.IDMat AND cd.IDCD = a.IDCD"
+
" ORDER BY IDAct";
SqlCommand sqlCmd=new SqlCommand(sqlString, sqlConn);
SqlDataReader sqlDr=sqlCmd.ExecuteReader();

string result=
""+
"<activitati>";

string pageContent="";
while(sqlDr.Read())
{
string activ= "<activitate>\n"+
" <numemat>"+sqlDr["NumeMat"].ToString()+"\n"+
" <numecd>"+sqlDr["NumeCD"].ToString()+"\n"+
" <durata>"+sqlDr["durata"].ToString()+"\n"+
" <nrstud>"+sqlDr["nrstud"].ToString()+"\n"+
"\n";
pageContent=pageContent+activ;
result=result+pageContent;
}
sqlDr.Close();
result=result+"\n";

how can I put "result" in myXml.xml???

When I was working to a project in ASP, I used DocumentContent property....
GeneralRe: xml in windows forms Pin
Heath Stewart13-Feb-04 12:36
protectorHeath Stewart13-Feb-04 12:36 
GeneralItembackground Color in ListBox Pin
Snowjim13-Feb-04 8:01
Snowjim13-Feb-04 8:01 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 12:32
protectorHeath Stewart13-Feb-04 12:32 
GeneralRe: Itembackground Color in ListBox Pin
Snowjim13-Feb-04 14:27
Snowjim13-Feb-04 14:27 
GeneralRe: Itembackground Color in ListBox Pin
Heath Stewart13-Feb-04 16:48
protectorHeath Stewart13-Feb-04 16:48 
GeneralInterfaces Pin
MrJJKoolJ13-Feb-04 7:21
MrJJKoolJ13-Feb-04 7:21 
GeneralRe: Interfaces Pin
Heath Stewart13-Feb-04 12:29
protectorHeath Stewart13-Feb-04 12:29 
GeneralRe: Interfaces Pin
MrJJKoolJ13-Feb-04 12:34
MrJJKoolJ13-Feb-04 12:34 
GeneralImplementing IDropTargetInterFace in C# Pin
vnutheti13-Feb-04 6:35
vnutheti13-Feb-04 6:35 
GeneralRe: Implementing IDropTargetInterFace in C# Pin
Heath Stewart13-Feb-04 12:20
protectorHeath Stewart13-Feb-04 12:20 
GeneralRe: Implementing IDropTargetInterFace in C# Pin
vnutheti13-Feb-04 13:44
vnutheti13-Feb-04 13:44 
GeneralRe: Implementing IDropTargetInterFace in C# Pin
Heath Stewart13-Feb-04 16:46
protectorHeath Stewart13-Feb-04 16:46 
GeneralRe: Implementing IDropTargetInterFace in C# Pin
vnutheti14-Feb-04 8:06
vnutheti14-Feb-04 8:06 
GeneralUsing and intercepting command line programs Pin
noahfields13-Feb-04 6:00
noahfields13-Feb-04 6:00 
GeneralRe: Using and intercepting command line programs Pin
Kentamanos13-Feb-04 7:12
Kentamanos13-Feb-04 7:12 
GeneralRe: Using and intercepting command line programs Pin
noahfields14-Feb-04 4:05
noahfields14-Feb-04 4:05 
GeneralDataset and Recordset Pin
ASGill13-Feb-04 5:11
ASGill13-Feb-04 5:11 

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.