Friday, March 16, 2012

Parameters in email to select records in a database

I would like to set up a forum on my web site. I have set up the database, the webfoms and can send email to the participants. I would like to send an email to participants annoucing a new post. I would like to include a link in this email to allow the recipient to go directly to the new post within in the forum. How do I set up the link from the email to send the parameters that allow for the specific post to be selected from the database?

Define a logic as what this forum does. Have a link with query string and idetify the thread with the thread id.

In Brief:

Let the Thread be loaded in a specified form. It has to be populated on the basis of Post's id. Lets say if your link is

http://www.example.com/forum/ShowThread.aspx?PostId=10

On page load of ShowThread load the content based on query string PostId. I hope your problem will be solved when you handle your sitiuation in above mentioned manner.

Let me know if you need any further help


Thank you for your answer but I am a little confused. The link in your response does not work so I cannot see the example that makes your explanation clearer.


the link AshokRaja has given u is a faked one. He just made an example to show u what your link should look like, it's not a real link.


one of the best possible way to do is

1)at the click of the button which posts the new post trigger a function which sends mail to all the forum users.

public void send_mail(string strpid)

{

get the emailids and trigger a mail with mail body

strmess="<a href='.com/disp_post?postid=" + strpid +'">new post</a>"

}


Thanks, I will work on this.

David

0 comments:

Post a Comment