Click here to Skip to main content
15,885,366 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Does Google black list a website ? Pin
Thomas Daniels17-May-13 6:18
mentorThomas Daniels17-May-13 6:18 
AnswerRe: Does Google black list a website ? Pin
David Kroj26-May-13 23:18
David Kroj26-May-13 23:18 
AnswerRe: Does Google black list a website ? Pin
David Kroj3-Jun-13 1:54
David Kroj3-Jun-13 1:54 
Questionasp.net Pin
vikas8616-May-13 0:03
vikas8616-May-13 0:03 
QuestionRe: asp.net Pin
Rojan Gh.16-May-13 12:28
professionalRojan Gh.16-May-13 12:28 
AnswerRe: asp.net Pin
David Kroj26-May-13 23:28
David Kroj26-May-13 23:28 
QuestionWebsrvice sql for server stored procedure Pin
billythekidney11-May-13 0:16
billythekidney11-May-13 0:16 
AnswerRe: Websrvice sql for server stored procedure Pin
Jasmine250114-May-13 7:03
Jasmine250114-May-13 7:03 
Several things have to come together to give JSON back to the browser... your service has to be decorated like this...

C#
[ScriptService]
public class wMDTServices {
    [WebMethod]
    //public String Read(int skip, int take, IEnumerable<Sort> sort, Filter filter)
    public List<DataRow> Read() {
        try {
            //changed this to use something I could find that might work, it had a compilation error - DA
            DataSet result = OracleSQLHelper.RetrieveFromSQL("Some Query");

            var myList = new List<DataRow>();

            foreach (DataRow r in result.Tables[0].Rows) {
                myList.Add(r);
            }

            return myList;
        } catch {
            return null;// Newtonsoft.Json.JsonConvert.SerializeObject(exception);
        } finally { }
    }
}


Then, you have to call it with the right content type, like this... (part of a JQuery Ajax call)

JavaScript
transport: {
    read: {
        url: myWebServiceUrl + "/Read",
        dataType: "json",
        type: "post",
        contentType: "application/json; charset=utf-8"
    }
}


The important things there are the contentType, the "post" request type, and the datatype "json" which are all needed to tell the web service that you want JSON back. If all these things are received by the server correctly, it will send back JSON strings.
Questionopacity issue with ie6 Pin
rakeshs3129-May-13 20:03
rakeshs3129-May-13 20:03 
AnswerRe: opacity issue with ie6 Pin
Member 1005025413-May-13 21:40
Member 1005025413-May-13 21:40 
GeneralRe: opacity issue with ie6 Pin
rakeshs31214-May-13 17:12
rakeshs31214-May-13 17:12 
AnswerRe: opacity issue with ie6 Pin
Richard Deeming15-May-13 1:48
mveRichard Deeming15-May-13 1:48 
Questionhelp with word wrap please Pin
Jassim Rahma8-May-13 11:08
Jassim Rahma8-May-13 11:08 
AnswerRe: help with word wrap please Pin
Thomas Daniels8-May-13 22:01
mentorThomas Daniels8-May-13 22:01 
QuestionRe: help with word wrap please Pin
Richard Deeming9-May-13 2:10
mveRichard Deeming9-May-13 2:10 
QuestionDatabase Error Pin
Rajib087-May-13 22:56
Rajib087-May-13 22:56 
Generalhelp for Google +1 button Pin
Gnana Akilan7-May-13 8:54
Gnana Akilan7-May-13 8:54 
GeneralRe: help for Google +1 button Pin
Sandeep Mewara7-May-13 23:03
mveSandeep Mewara7-May-13 23:03 
Questionnew to programming and need to write a virtual classroom program Pin
dowells7-May-13 2:02
dowells7-May-13 2:02 
AnswerRe: new to programming and need to write a virtual classroom program Pin
Richard MacCutchan7-May-13 2:53
mveRichard MacCutchan7-May-13 2:53 
QuestionHow Best to Build Web App to Receive & Post Async Data From Server Pin
Member 817307430-Apr-13 8:43
Member 817307430-Apr-13 8:43 
QuestionForm submit error message Pin
Tichaona J29-Apr-13 5:04
Tichaona J29-Apr-13 5:04 
AnswerRe: Form submit error message Pin
rpprojects16-May-13 16:11
rpprojects16-May-13 16:11 
GeneralRe: Form submit error message Pin
Tichaona J26-May-13 7:37
Tichaona J26-May-13 7:37 
GeneralRe: Form submit error message Pin
David Kroj26-May-13 23:54
David Kroj26-May-13 23:54 

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.