Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Go Back  Xtreme Visual Basic Talk > > > Asp.net: using Console application call Web-form application's method


Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2017, 02:50 PM
kuba15 kuba15 is offline
Newcomer
 
Join Date: Nov 2017
Location: Berlin, Germany
Posts: 1
Default Asp.net: using Console application call Web-form application's method


I am trying to make web form asp.net application to windows service. I got a tutorial there console application used to convert exe file, then it is used as a windows service. That is run in starting of windows and do continue. I need web form (aspx, cs files used) page convert to service what will run in starting of windows. or any way to make cron-job of web form page where used timer,

Code:
aspx::
    <asp:Timer ID="Timer1" runat="server" Interval="" ontick="Timer1_Tick">
             </asp:Timer>
cs::
  public void CallMethod()//-------------------3
        {
            conCondition.GetConnectedConn();//con test from diff class
            CopyLocalDir();
            InsertAtmLogToDB();
            ParsedDataInsert();//
        }

        protected void Timer1_Tick(object sender, EventArgs e)//Ontick method-------defined in input----2
        {
            CallMethod();
        }

        public void getInterval()/// Called in page load-----to call::: Timer1_Tick-----------1
        {
            string selectTime = "select time from timer";
            con.Open();
            SqlCommand select = new SqlCommand(selectTime, con);
            SqlDataReader sdr = select.ExecuteReader();

            int setTime = 0;
            if (sdr.Read())
            {
                setTime = int.Parse(sdr["time"].ToString());
            }
            con.Close();
            Timer1.Interval = setTime;//set time to id(named Timer1) of input field(of aspx file)
        }
Reply With Quote
Reply

Tags
windows, web, service, void, application, aspx, form, page, time, run, starting, public, select, settime, asp.net, console, file, call, convert, input----2, timer;, method-------defined, e//ontick, eventargs, fieldof


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
 
Asp.net: using Console application call Web-form application's method
Asp.net: using Console application call Web-form application's method
 
-->