Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Web method that returns string
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
sbugig
19y
2.2k
1
Reply
Hi: i have the web method that looks like the following: [WebMethod] public string getUserInfo (string userId, string password) { OleDbDataReader rdr; conn.Open(); rdr = cmd.ExecuteReader(); bool ret = rdr.Read (); if(ret) { ; XMLFormat = "
\n"; XMLFormat += "
" + rdr.GetValue(0).ToString() + "
\n"; XMLFormat += "
" + rdr.GetValue(1).ToString () + "
\n"; XMLFormat += "
" + rdr.GetValue(2).ToString() + "
\n"; XMLFormat += "
" + rdr.GetValue(3).ToString() + "\n"; XMLFormat += "
" + rdr.GetValue(4).ToString() + "
\n"; XMLFormat += "
"+ rdr.GetValue(5).ToString() + "
\n"; XMLFormat += "
" + rdr.GetValue(6).ToString() + "
\n"; XMLFormat += "
" + rdr.GetValue(7).ToString() + "
\n"; XMLFormat += "
" + rdr.GetValue(8).ToString() + "
\n"; return XMLFormat; } else { XMLFormat = "This user does not exist"; rdr.Close(); return XMLFormat; } } N.B.never mind the query statement i'm saving space now i have the web application that has text boxes i need to return the string from this method and display the data to corresppondin textBoxes 1. name textbox 2. age textbox 3. address1 textbox and othe textboxes can anyone help me please
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to Bind data to crystal reports dynamically
how to use StreamReader.Peek() ?