Click here to Skip to main content
15,897,187 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Third Party Tool? Pin
Not Active21-Jan-09 2:13
mentorNot Active21-Jan-09 2:13 
QuestionADODB.Recordset error '800a0cc1' Pin
Member 340808220-Jan-09 22:30
Member 340808220-Jan-09 22:30 
AnswerRe: ADODB.Recordset error '800a0cc1' Pin
Aman Bhullar20-Jan-09 23:29
Aman Bhullar20-Jan-09 23:29 
GeneralRe: ADODB.Recordset error '800a0cc1' [modified] Pin
Member 340808221-Jan-09 16:17
Member 340808221-Jan-09 16:17 
GeneralRe: ADODB.Recordset error '800a0cc1' Pin
Aman Bhullar21-Jan-09 21:20
Aman Bhullar21-Jan-09 21:20 
GeneralRe: ADODB.Recordset error '800a0cc1' Pin
Member 340808221-Jan-09 21:34
Member 340808221-Jan-09 21:34 
GeneralRe: ADODB.Recordset error '800a0cc1' Pin
Aman Bhullar21-Jan-09 23:24
Aman Bhullar21-Jan-09 23:24 
GeneralRe: ADODB.Recordset error '800a0cc1' Pin
Member 340808221-Jan-09 16:34
Member 340808221-Jan-09 16:34 
QuestionURL in action attribute is converted to page name only (for FireFox)......? Pin
AshishTijare20-Jan-09 20:10
AshishTijare20-Jan-09 20:10 
QuestionSending HTML email using mailto Pin
peaceful_warrior20-Jan-09 18:35
peaceful_warrior20-Jan-09 18:35 
AnswerRe: Sending HTML email using mailto Pin
Aman Bhullar20-Jan-09 21:51
Aman Bhullar20-Jan-09 21:51 
QuestionCapture an object in ASP Pin
Anoop Unnikrishnan20-Jan-09 17:06
Anoop Unnikrishnan20-Jan-09 17:06 
QuestionCircumventing IE Navigation Controls Pin
Roger Wright20-Jan-09 16:53
professionalRoger Wright20-Jan-09 16:53 
QuestionHow to Display Repeater control Items like table with rows and columns??? Pin
Charmy320-Jan-09 9:28
Charmy320-Jan-09 9:28 
AnswerRe: How to Display Repeater control Items like table with rows and columns??? Pin
Abhishek Sur20-Jan-09 10:41
professionalAbhishek Sur20-Jan-09 10:41 
QuestionVirtual Pin
BRIMID19-Jan-09 11:12
BRIMID19-Jan-09 11:12 
QuestionComplex c# javascript to web sevice call question Pin
m1k3314118-Jan-09 15:45
m1k3314118-Jan-09 15:45 
I have the following web service

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.Web.Script.Services.ScriptService]
public class Test : System.Web.Services.WebService {

    [WebMethod(true)]
    public void Calc(int value)
    {
        int ii = 0;

        SessionHandler.Session = Session;
        SessionHandler.MyInt = value;

        while (ii < 20)
        {
            SessionHandler.MyInt = value * ii;
            System.Threading.Thread.Sleep(1000);
            ii++;
        }
    }

    [WebMethod(true)]
    public int GetResult()
    {
        int returnVal = 0;
        
        returnVal = SessionHandler.MyInt;

        return returnVal;
    }
}


I have the following javascript

function Calculate() {
    var size = document.getElementById("size").value;
    var watch = document.getElementById("watch").checked;

    myInterval = setInterval("ShowResult()", 500);
    Test.Calc(size, Demo);
}

function Demo(result) {
    ShowResult(result);
}

function ShowResult(result) {
    Test.GetResult(DisplayResult);
}

function DisplayResult(result) {
    var disp = document.getElementById("result");

    disp.value = result;
}


The sessionhandler is simply the following

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

public static class SessionHandler
{
    private static String myInt = "myint";
    private static System.Web.SessionState.HttpSessionState _session;

    public static int MyInt
    {
        get { return (int)SessionHandler._session[SessionHandler.myInt]; }
        set { SessionHandler._session[SessionHandler.myInt] = value; }
    }

    public static System.Web.SessionState.HttpSessionState Session
    {
        get { return _session; }
        set { SessionHandler._session = value; }
    }
}


I have an ASP page that uses the javascript to call a web service. The web service manipulates a calculation. The javascript polls the webservice using an interval to monitor the calculation as it takes place. It does this by use of a session variable. The first time the aspx page runs (it's simply 2 textboxes, a checkbox and a button) and the button is clicked, I can watch the value in the results textbox climb as the calculation takes place. If, when the calculation is done, I click the button again, the intervals that call the web service appear to take place, but the web service function is not actually called until the first calculation (Calc) is finished (after the new button click). This means that after the first page load and run through of watching the calculation, I can not watch the calculation perform again.

My goal is to be able to use a webservice to watch a calculation take place on server side from the client. I do not want an postbacks as that would defeat the purpose of the web service. Can anyone help provide any insight?
QuestionAdding custom button to IE Pin
Haim Nachum18-Jan-09 10:00
Haim Nachum18-Jan-09 10:00 
AnswerRe: Adding custom button to IE Pin
Not Active19-Jan-09 5:22
mentorNot Active19-Jan-09 5:22 
Questionemail server Pin
JimmyRopes18-Jan-09 9:46
professionalJimmyRopes18-Jan-09 9:46 
AnswerRe: email server Pin
Aman Bhullar18-Jan-09 18:28
Aman Bhullar18-Jan-09 18:28 
GeneralRe: email server Pin
JimmyRopes19-Jan-09 1:34
professionalJimmyRopes19-Jan-09 1:34 
AnswerRe: email server Pin
Jörgen Andersson19-Jan-09 4:24
professionalJörgen Andersson19-Jan-09 4:24 
GeneralRe: email server Pin
JimmyRopes19-Jan-09 4:34
professionalJimmyRopes19-Jan-09 4:34 
GeneralRe: email server Pin
Jörgen Andersson19-Jan-09 5:00
professionalJörgen Andersson19-Jan-09 5:00 

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.