Click here to Skip to main content
15,900,453 members
Home / Discussions / Web Development
   

Web Development

 
Questiontext boxes in graphical view Pin
roselotus22-Oct-11 12:52
roselotus22-Oct-11 12:52 
QuestionIE6 Pain...jQuery Show / Hide Plugin Pin
AndyInUK21-Oct-11 1:51
AndyInUK21-Oct-11 1:51 
AnswerRe: IE6 Pain...jQuery Show / Hide Plugin Pin
Dennis E White21-Oct-11 4:06
professionalDennis E White21-Oct-11 4:06 
GeneralRe: IE6 Pain...jQuery Show / Hide Plugin Pin
AndyInUK21-Oct-11 6:19
AndyInUK21-Oct-11 6:19 
GeneralRe: IE6 Pain...jQuery Show / Hide Plugin Pin
Dennis E White21-Oct-11 10:01
professionalDennis E White21-Oct-11 10:01 
QuestionHow do I center a <div> vertically? Pin
Xarzu18-Oct-11 23:15
Xarzu18-Oct-11 23:15 
AnswerRe: How do I center a vertically? Pin
Dennis E White20-Oct-11 11:24
professionalDennis E White20-Oct-11 11:24 
QuestionFormulas Pin
BobInNJ9-Oct-11 5:19
BobInNJ9-Oct-11 5:19 
AnswerRe: Formulas Pin
killabyte9-Oct-11 16:48
killabyte9-Oct-11 16:48 
AnswerRe: Formulas Pin
Dalek Dave12-Oct-11 22:56
professionalDalek Dave12-Oct-11 22:56 
GeneralRe: Formulas Pin
BobInNJ13-Oct-11 8:04
BobInNJ13-Oct-11 8:04 
AnswerRe: Formulas Pin
Shameel12-Oct-11 23:17
professionalShameel12-Oct-11 23:17 
AnswerRe: Formulas Pin
AditSheth13-Oct-11 19:40
AditSheth13-Oct-11 19:40 
AnswerRe: Formulas Pin
phil.o28-Oct-11 2:29
professionalphil.o28-Oct-11 2:29 
QuestionPublishing website with Report Viewer control Pin
countmein6-Oct-11 15:18
countmein6-Oct-11 15:18 
AnswerRe: Publishing website with Report Viewer control Pin
countmein9-Oct-11 4:03
countmein9-Oct-11 4:03 
AnswerHow to receive dataset in jquery Pin
goplappu3-Oct-11 20:51
goplappu3-Oct-11 20:51 
GeneralRe: How to receive dataset in jquery Pin
Dennis E White8-Oct-11 15:41
professionalDennis E White8-Oct-11 15:41 
question, statement or are you just giving us your current status?? Smile | :)

the way that I have generally done something like this is to call some
C#
[WebMethod]
either in a web service or a page method. technically those
C#
public static
page methods are nothing but web service methods. at least in my opinion they are.

C#
[WebMethod]
[System.Web.Script.Services.ScriptMethod(ResponseFormat = System.Web.Script.Services.ResponseFormat.Xml)]
public DataTable someMethod(string param)
{
     DataSet dsReturn;

     try
     {
          // do your database stuff

          // I like to name the table so that it makes parsing it in jQuery easier for me
          dsReturn.Tables[0].TableName = "someName";
     }
     catch (Exception)
     {
          // do your error handling
          throw;
     }

     return dsReturn.Tables[0];
}


then my jQuery code I use the
JavaScript
$.ajax(...)
function to call the web service.

JavaScript
$.ajax({
     type: 'POST',
     url: 'location/name.asmx/someMethod',
     data: "{ 'param': 'paramValue' }",
     contentType: 'application/json; charset=utf-8',
     dataType: 'xml',
     success: function (xml) {
          // parse and loop through the records in the datatable
          $('someName', xml).each(function() {
               // your this pointer actually is a record in your datable 
               $(this).find('ColumnName').text();
          });
     },
     error: function(err) {
           // do your jQuery error handling here
     }
});

Questionjquery Pin
goplappu3-Oct-11 20:50
goplappu3-Oct-11 20:50 
Answerok, i will play... Pin
cjoki4-Oct-11 8:25
cjoki4-Oct-11 8:25 
GeneralRe: ok, i will play... Pin
Not Active4-Oct-11 12:44
mentorNot Active4-Oct-11 12:44 
GeneralRe: ok, i will play... Pin
cjoki5-Oct-11 4:48
cjoki5-Oct-11 4:48 
AnswerRe: jquery Pin
Dalek Dave6-Oct-11 22:33
professionalDalek Dave6-Oct-11 22:33 
GeneralRe: jquery Pin
Pravin Patil, Mumbai12-Oct-11 22:40
Pravin Patil, Mumbai12-Oct-11 22:40 
QuestionHELP Pin
xero-Legendz1-Oct-11 12:50
xero-Legendz1-Oct-11 12:50 

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.