开发者

Updating SQl database via email

开发者 https://www.devze.com 2023-02-20 19:33 出处:网络
Below is my requirement. Depending upon some condition I want to send the mail to the xyz user which will have two links \"Accept\" and \"Reject\" 开发者_高级运维in the message body. When the recepien

Below is my requirement. Depending upon some condition I want to send the mail to the xyz user which will have two links "Accept" and "Reject" 开发者_高级运维in the message body. When the recepient clicks either of the link an update/insert should be performed in the database against a particular record. For this , when I will be sending the mail, I will be requiring to send some unique Id along with the mail depending upon which I will be able to decide which record to update in the database. I am using SQl Server 2008 and C#.net. Does any one know how to implement it in VS 2008.

Regards, Prathamesh


It sounds like you're asking for a complete solution, which might be beyond the scope of this site. (Or it might not! I don't even know!)

That being said, it's pretty trivial to add HTML buttons or plaintext links to an email that point to a script on your webserver - you can style the interface however you like with HTML and CSS and a lot of email readers will render it properly. I was going to put together a pseudocode example but it's really not likely to be that helpful.


You can point the links in the email to a web page and add a query string to "mark" the correct row to update/insert. In the aspx page you need to make the logic to get the query string parameter and update the DB with the correct info.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号