Click here to Skip to main content
15,911,531 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: I want to use jquery datatable in asp.net MVC for more than 3000 records Pin
Member 1151413627-Mar-15 16:32
Member 1151413627-Mar-15 16:32 
SuggestionRe: I want to use jquery datatable in asp.net MVC for more than 3000 records Pin
Arkadeep De29-Mar-15 1:47
professionalArkadeep De29-Mar-15 1:47 
GeneralRe: I want to use jquery datatable in asp.net MVC for more than 3000 records Pin
F-ES Sitecore29-Mar-15 6:33
professionalF-ES Sitecore29-Mar-15 6:33 
GeneralRe: I want to use jquery datatable in asp.net MVC for more than 3000 records Pin
Member 1155596129-Mar-15 10:34
Member 1155596129-Mar-15 10:34 
QuestionGenrate PPT without using interop. Pin
ashish_sahir26-Mar-15 0:08
ashish_sahir26-Mar-15 0:08 
AnswerRe: Genrate PPT without using interop. Pin
Richard Deeming26-Mar-15 3:11
mveRichard Deeming26-Mar-15 3:11 
NewsWorking on ASP.NET CI + deployment solution Pin
Alexnader Selishchev25-Mar-15 23:12
Alexnader Selishchev25-Mar-15 23:12 
SuggestionRe: Working on ASP.NET CI + deployment solution Pin
Richard Deeming26-Mar-15 3:08
mveRichard Deeming26-Mar-15 3:08 
GeneralRe: Working on ASP.NET CI + deployment solution Pin
jkirkerx26-Mar-15 12:46
professionaljkirkerx26-Mar-15 12:46 
QuestionGet name of a control in Code behind Pin
indian14325-Mar-15 10:24
indian14325-Mar-15 10:24 
SuggestionRe: Get name of a control in Code behind Pin
ZurdoDev25-Mar-15 11:02
professionalZurdoDev25-Mar-15 11:02 
AnswerRe: Get name of a control in Code behind Pin
Richard Deeming26-Mar-15 3:06
mveRichard Deeming26-Mar-15 3:06 
Questionis asp.net code is same as vb.net (except the declaration) Pin
Member-unknown25-Mar-15 3:36
Member-unknown25-Mar-15 3:36 
AnswerRe: is asp.net code is same as vb.net (except the declaration) Pin
Afzaal Ahmad Zeeshan25-Mar-15 4:07
professionalAfzaal Ahmad Zeeshan25-Mar-15 4:07 
GeneralRe: is asp.net code is same as vb.net (except the declaration) Pin
Member-unknown25-Mar-15 6:37
Member-unknown25-Mar-15 6:37 
GeneralRe: is asp.net code is same as vb.net (except the declaration) Pin
F-ES Sitecore25-Mar-15 7:30
professionalF-ES Sitecore25-Mar-15 7:30 
AnswerRe: is asp.net code is same as vb.net (except the declaration) Pin
Richard Deeming25-Mar-15 8:48
mveRichard Deeming25-Mar-15 8:48 
GeneralRe: is asp.net code is same as vb.net (except the declaration) Pin
ZurdoDev25-Mar-15 11:03
professionalZurdoDev25-Mar-15 11:03 
QuestionASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev24-Mar-15 4:49
QuickBooksDev24-Mar-15 4:49 
I have a simple VB.Net web app that gets a large table based on Form controls and I need it display the progress such as Doing 'Record# nnn'.

This method can be simulated with via clicking on a button the the form is initiated which is the instance that we need to access. lblMsg is a label on the form what I would like to update.
Public Function GetTable
   Dim I as Integer
   for I = 1 to 10
      lblMsg.Text = "Doing Record# " & i
      Sleep 1000
   next
End Function


We are currently trying the below but when GetTable gets control lblMsg is nothing which means that the form is not initialed.

How can I get this to work?
XML
$(document).ready(function () {

                    $("#btnTrial").click(function (e) {

                        e.preventDefault();
                        $("#btnTrial").attr('disabled', 'disabled');

                        var total = 5;
                        if (document.getElementById('<%=txtLoopRows.ClientID %>').value != "") {
                            var total = document.getElementById('<%=txtLoopRows.ClientID %>').value;
                        }
                        // comes here the first time
                        PageMethods.OperatePage(total, function (result) {


                            if (result) {
                                setTimeout($.updateProgressbar, 500);
                            }
                        });
                    });
                });


<System.Web.Services.WebMethod(EnableSession:=True)> _
   Public Shared Function OperatePage(total As Integer) As Object

       Dim session As HttpSessionState = HttpContext.Current.Session

       Dim totalParsed As Integer = 0
       Integer.TryParse(total.ToString(), totalParsed)
       _TotalLoop = totalParsed  ' 1

       System.Threading.ThreadPool.QueueUserWorkItem(AddressOf ThreadProc, session)  '  Sets to invoke ThreadProc

       Return New With {.progress = 0}
   End Function


<System.Web.Services.WebMethod(EnableSession:=True)> _
 Public Shared Function ThreadProc(ByVal stateInfo As Object) '2
     '  Loops with sleep but sets StateVariable to the counter which is picked up by Progress Page then to $.updateProgressbar = function
     '  InfusionSoft stuff here
     Dim DefPage As New _Default
     DefPage.GetTable(stateInfo)  ' Invokes but form variables are nothing

     stateInfo("TICK") = Nothing
 End Function

Thanks

modified 24-Mar-15 11:18am.

AnswerRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
F-ES Sitecore24-Mar-15 8:25
professionalF-ES Sitecore24-Mar-15 8:25 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev24-Mar-15 9:56
QuickBooksDev24-Mar-15 9:56 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
F-ES Sitecore24-Mar-15 10:16
professionalF-ES Sitecore24-Mar-15 10:16 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev25-Mar-15 10:55
QuickBooksDev25-Mar-15 10:55 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
F-ES Sitecore25-Mar-15 11:17
professionalF-ES Sitecore25-Mar-15 11:17 
GeneralRe: ASPX How to get the form initiated from OperatePage - actually should be the existing instance Pin
QuickBooksDev26-Mar-15 2:30
QuickBooksDev26-Mar-15 2:30 

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.