Click here to Skip to main content
16,013,082 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questiondelete records automatically from database Pin
Pratheepa13-Jun-09 21:28
Pratheepa13-Jun-09 21:28 
AnswerRe: Ignore repost Pin
Manas Bhardwaj13-Jun-09 21:55
professionalManas Bhardwaj13-Jun-09 21:55 
AnswerRe: delete records automatically from database Pin
Niladri_Biswas13-Jun-09 21:57
Niladri_Biswas13-Jun-09 21:57 
AnswerRe: delete records automatically from database Pin
saanj13-Jun-09 22:27
saanj13-Jun-09 22:27 
GeneralRe: delete records automatically from database Pin
N a v a n e e t h13-Jun-09 23:43
N a v a n e e t h13-Jun-09 23:43 
GeneralRe: delete records automatically from database Pin
saanj14-Jun-09 0:45
saanj14-Jun-09 0:45 
GeneralRe: delete records automatically from database Pin
Pratheepa13-Jun-09 23:57
Pratheepa13-Jun-09 23:57 
GeneralRe: delete records automatically from database Pin
saanj14-Jun-09 0:54
saanj14-Jun-09 0:54 
You may have a table called "tblAdvertisement" where you are storing all advertisements. This is the table from which you are also showing advertisments in the page. Now add a seperate column (of datetime type) called "validTillDate" column. Whenever you are inserting any record in the "tblAdvertisement", put a "validTillDate" for the advertisement. "validTillDate" simply stores the date till the advertisement will be valid and active.

When you are going to show advertisments on the page, check all advertisements' "validTillDate" column pick only those advertisement whose "validTillDate" column value is less than or equal to the current date. It will be best if you can check it in the sql statement itself. Just checkout the sample sql query:

select * from tblAdvertisement where validTillDate <= getdate()

I think this explanation should be enough for you to get started. There is no link and url that I can give to you as there is more logic invloved than coding. In case of any issue, revert back to us.

Regards
Saanj

There is no foolish question, there is no final answer...

QuestionRadDateTime picker in radgrid Pin
chinmay kumar palei13-Jun-09 20:58
chinmay kumar palei13-Jun-09 20:58 
QuestionFolder Security Pin
ellllllllie13-Jun-09 18:45
ellllllllie13-Jun-09 18:45 
QuestionCaching not working Pin
Steve Holdorf13-Jun-09 10:34
Steve Holdorf13-Jun-09 10:34 
AnswerRe: Caching not working Pin
Mark Graham14-Jun-09 11:43
Mark Graham14-Jun-09 11:43 
QuestionUser control using AJAX Control Toolkit Pin
AB777113-Jun-09 8:00
AB777113-Jun-09 8:00 
AnswerRe: User control using AJAX Control Toolkit Pin
Christian Graus13-Jun-09 13:04
protectorChristian Graus13-Jun-09 13:04 
QuestionHow to upload Product XSD into Amazon site .... Pin
chirag_pandey13-Jun-09 4:42
chirag_pandey13-Jun-09 4:42 
AnswerRe: How to upload Product XSD into Amazon site .... Pin
N a v a n e e t h13-Jun-09 5:10
N a v a n e e t h13-Jun-09 5:10 
QuestionJavascript call Pin
AB777113-Jun-09 4:29
AB777113-Jun-09 4:29 
AnswerRe: Javascript call Pin
Niladri_Biswas13-Jun-09 5:06
Niladri_Biswas13-Jun-09 5:06 
AnswerRe: Javascript call Pin
N a v a n e e t h13-Jun-09 5:08
N a v a n e e t h13-Jun-09 5:08 
GeneralRe: Javascript call Pin
AB777113-Jun-09 8:10
AB777113-Jun-09 8:10 
Questionhow can bind two tables to one grid view Pin
Bandanenilima13-Jun-09 3:28
Bandanenilima13-Jun-09 3:28 
AnswerRe: how can bind two tables to one grid view Pin
Colin Angus Mackay13-Jun-09 3:41
Colin Angus Mackay13-Jun-09 3:41 
AnswerRe: how can bind two tables to one grid view [modified] Pin
Niladri_Biswas13-Jun-09 4:54
Niladri_Biswas13-Jun-09 4:54 
AnswerRe: how can bind two tables to one grid view Pin
N a v a n e e t h13-Jun-09 5:20
N a v a n e e t h13-Jun-09 5:20 
QuestionNeed help multiline textbox Pin
NetQuestions13-Jun-09 3:16
NetQuestions13-Jun-09 3:16 

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.