|
Two options are
1 - Windows services
2 - A windows application runs on background and giving request to a web service which sends mail
|
|
|
|
|
Rohde wrote: I guess the only way to do that is to have a Windows Service right?
I guess there is one more way to do this. You can schedule a job on the database-side using SQL Server Agent which will wake up every morning and do the task.
Rohde wrote: I've tried to persuade the powers in be that the easiest way is for somebody to click a button every Monday morning to start the procedure
Triggering a procedure from the application side on the button click event to perform a scheduled task is not a good practice. What if the person forget's to do his task...
Yes, you can write a windows service to perform this task...
Regards - J O N -
|
|
|
|
|
John Prabhu wrote: I guess there is one more way to do this. You can schedule a job on the database-side using SQL Server Agent which will wake up every morning and do the task.
Yes I know, but our current RDBMS doesn't have that functionality, MySQL v5.0, but events will debut in MySQL 5.1 so perhaps we will look at if and when we upgrade.
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
You can also use the database directly to send the emails. for this create a strored procedure and scheduled a job in the database then will run automatically after the specified time.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
Yes I know, but we're using MySQL v5.0 and events are in v5.1 which at the moment is a release candidate.
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
J4amieC wrote: Thankfully, but somewhat worryingly, the powers that be are smarter than you!
Well, since you don't know what the task is you are talking out of your arse.
It's a nonessential task which doesn't really need to be run every week since it depends on other factors and I foresee a lot of trouble if the task isn't run only when needed.
But why you do feel the need to be such a rude arse, are you insecure?
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
Rohde wrote: I need to send mails automatically once a week from an ASP.NET app based on some information stored in the database. I guess the only way to do that is to have a Windows Service right?
Basically what J4amieC said, which is:
1- Create a small windows app that simply calls the ASP.NET page.
2- Schedule a windows task to call that EXE once a week.
3- Send the email through the ASP.NET page in question.
Of course the whole thing would have been easier if you could run cron jobs on windows.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi,
I need to load the Dataset's first row value in a List box. Can any one say the syntax.
|
|
|
|
|
Do You want bind the first Column value to the ListBox or the First Row Value? Am confussed...
Regards - J O N -
|
|
|
|
|
|
ListBox.Items.Add(New ListItem((ds.Tables(0).Rows(0).Item("ColName").ToString), (ds.Tables(0).Rows(0).Item("ColName").ToString)))
Regards - J O N -
|
|
|
|
|
|
Hi All,
Can load User Control through javascript on ajax tab click event???
Thanks in advance...
|
|
|
|
|
Hey guys, I will try and keep this as concise as I can. Basically I
am developing a site which uses a Wizard Control (dynamically
generated from a database) as a search form linked to a results page
which takes out all the information from the wizard and searches the
database for matching items. I cannot make use of javascript,
sessions OR cookies and so I am totally reliant on viewstate for the
whole operation.
For this reason my wizard and results page are all one physical aspx
page and everything is handled through postbacks to retain data. I
have come to a problem though. I am now trying to implement paging
for my results page. I cannot use hyperlinks for this as they do not
postback and hence I lose all the data entered in my wizard! My
solution to this was to try to design my paging solution as a
composite control.
I have tried using both the CompositeControl AND WebControl napespaces
but whatever I try, if I click one of the buttons in my composite/
webcontrol, the click handler fails to register the click and my page
simply re-submits. I am implementing INamingContainer and I've tried
using the control type described here:
http://www.codeproject.com/aspnet/composite_controls.asp?print=true
I just cannot figure out the issue! If anyone has any ideas I would
be very greatful to hear them!
Thanks in advance, James Ward.
|
|
|
|
|
Hi James
Firstly, if you use an ASP LinkButton for your hyperlinks then they can postback.
Secondly, I've had similar problems! I ended up with a solution where I had an object that managed the presentation of the grid results (current page, total pages, the query etc). I was persisting this to session, but I can't see why in your case you couldn't serialize it and add it to the viewstate. Drop me an email at bjohns33 at hotmail.com if you want the detailed code for this.
Lastly, you might be able to come up with a solution using cross-page posting and persisting your data this way. A detailed look at the pros and cons is available here: http://www.odetocode.com/Articles/421.aspx
Cheers
Ben
|
|
|
|
|
have a button in the web page.now on closing the form i am showing the confirm message(are u sure u want to exit).
for that i am writing the following code.
<code><script language="javascript" type="text/javascript">
function abc()
{
if(confirm('Are u sure u want to exit')==true)
{
return true;
}
}
</script></code>
<code><body onunload="abc();"></body></code>
but the above code shows me the message box when i click the button.i want the message box to appear when i click the close button.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
When a button is clicked, obviously this event will fire because you are navigating away from page. To workaround with this issue, make a public variable (JS) and when button is clicked, make this variable value to true . Else it should be false . In your unload function check the status of this variable and show appropriate messages.
|
|
|
|
|
check whether you are calling the function on the OnClick event of the button.
Regards - J O N -
|
|
|
|
|
you can call your javascript methos (that showing confirm message) on "BeforeWindowClose" event of window object in javascript. in this case if a user click on the close button it fires before closing the window.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
Hello Pankaj ...
Pankaj how can i write the code it i click yes on the confirm message box.Actually i had to write some code on clicking yes.before the window gets closed.
Please help....
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
u wana close the window when u click the close the button
Piyush Vardhan Singh
|
|
|
|
|
u use this one page load
Button1.Attributes.Add("OnClick", "self.close()")
Piyush Vardhan Singh
|
|
|
|
|
<script language="javascript" type="text/javascript">
window.onbeforeunload = forClose;
function forClose()
{
mess = "You will lose all information provided\nduring navigation of this site";
return mess;
}
</script>
You can use the above code, to confirm while navigating from this page.
in the mess variable you can use your message.
if you have still any issue mail me.
Pankaj Gupta
(Take it easy)
|
|
|
|
|
y wld u us txtspk n a cnfm wndw?
also y dnt u jst rite ths as:
function abc()
{
return confirm("sme silly txtspk");
}
|
|
|
|
|
Hi Guys,
I have a webform that lets people apply for leave.
currently on btnApply_Click, I go through a lot of validation.
My code outline goes like this:
protected void btnApply_Click(object sender, EventArgs e)
{
if(ValidateDate())
{
if(ValidateLeaveBalance())
{
//the loop goes through a few more validation before leave application is carried out
ApplyLeave();
}
}
}//apply button method end
I am trying to use btnApply.Attributes.Add("onclick", "confirm('message')"); to show the applicant his leave details before confirming application.
1) How do I put his application dates into message?
2) How do i receive the input from the user if he clicks yes or no?
3) Can this confirm- javascript run after all the validation is passed?ie:before ApplyLeave(); ?
Please advise....
Thanks so much!
|
|
|
|