CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.classifieds_starter_kit Tags:
Item Type: NewsGroup Date Entered: 4/24/2007 12:56:43 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 15 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
chadcombes
Asp.Net User
Change Expiration time from days/weeks to hours4/24/2007 12:56:43 PM

0/0

I have looked around and cannot find an answer.
I'd like to think im better at .asp than i actually am, however, im still in the early stages.
I need to change the expiration time of an ad from days/weeks to hours only.
e.g. instead of listing it for 7 days, it is listed for 3 hours.
I have changed the values in the combo-box and their appropriate texts, using decimal values as the replacement values: 24 hours = 1, so therefore 12 hours = 1.5, 3 hours = 0.125 etc.
this does not work. instead, it creates the ad but no matter when i create an add the time of expiration is always 12:00 the next day.

Can someone help me? I may have gone about this in the completely wrong way, if so, please advice the correct path.

thanks in advance..
chad.
Benners_J
Asp.Net User
Re: Change Expiration time from days/weeks to hours4/24/2007 3:34:25 PM

0/0

Can you post the code that actually sets the expiration time?  My guess is that the error is in there somewhere.

chadcombes
Asp.Net User
Re: Change Expiration time from days/weeks to hours4/25/2007 3:22:16 AM

0/0

This is located in PostAd.aspx...

<

legend>For how long should this scrim be listed?</legend>

<asp:DropDownList ID="NumDaysList" runat="server">

<asp:ListItem Value="0.0208">1/2 Hour</asp:ListItem>

<asp:ListItem Value="0.0416">1 Hour</asp:ListItem>

<asp:ListItem Value="0.125" Selected="True">3 Hours</asp:ListItem>

<asp:ListItem Value="0.5">12 Hours</asp:ListItem>

</asp:DropDownList>

 As i said before, i changed each value myself. The ExpirationDate datatype is smalldatetime, in the classifieds_Ads Table.

 

 

Located in PostAd.aspx.vb...

Dim numDays As Double = Convert.ToDecimal((NumDaysList.SelectedValue))

It was previously

Dim numDays As Integer = Convert.ToInt32((NumDaysList.SelectedValue))

however i changed that to remove the error i had using decimals for expiration time.

 

Hope that helps.

mattbug
Asp.Net User
Re: Change Expiration time from days/weeks to hours4/25/2007 12:27:21 PM

0/0

You will most likely have to make a change to the following line(s) of code in App_Code/BLL/Ads.vb:

    Dim

expirationDate As DateTime = DateTime.Today.AddDays(numDaysActive)

It's in there several times under various Subs for updating and inserting ads.

chadcombes
Asp.Net User
Re: Change Expiration time from days/weeks to hours4/27/2007 2:57:24 PM

0/0

Thanks Heaps mattbug! fixed it.

now i have another issue. whenever i post an ad, it posts two identical ads and for the life of me, i cannot figure out why.

any suggestions anyone?
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
DNS and BIND Authors: Cricket Liu, Paul Albitz, Pages: 616, Published: 2006
Web Caching Authors: Duane Wessels, Pages: 300, Published: 2001
Ruby Cookbook Authors: Lucas Carlson, Leonard Richardson, Pages: 873, Published: 2006
Apache: The Definitive Guide Authors: Ben Laurie, Peter Laurie, Pages: 568, Published: 2003

Web:
Change Expiration time from days/weeks to hours - ASP.NET Forums I need to change the expiration time of an ad from days/weeks to hours only. e.g. instead of listing it for 7 days, it is listed for 3 hours ...
Flickr: Discussing Photo secret expiration time? in Flickr API Sep 18, 2008 ... In practice, I'd say photos older than a couple of days rarely change. Since you need to track privacy changes anyway, 24 hours is probably ...
Can't change expiration time in gpg 1.0.2: msg#00038 When I try to change a key's expiration time, the key editing procedure ... key expires in n days w = key expires in n weeks m = key expires in n ...
mod_expires - Apache HTTP Server years; months; weeks; days; hours; minutes; seconds ... You can also specify the expiration time calculation using an alternate syntax, described earlier in ...
macutil Each code has a configurable expiration time after which it becomes invalid. ... to specify num hours, days, or weeks in the future. ...
MQSeries.net :: View topic - Dynamically change Value of ... Dynamically change Value of Expiration Time in Process Insta ... All Posts, 1 Day, 7 Days, 2 Weeks, 1 Month, 3 Months, 6 Months, 1 Year ...
Nuke Forums :: View topic - cookie expire time where do I set the expire time on the cookies, like two hours both for ... To edit admins cookie expiration time you have to change the file ...
CacheRight Evaluation Guide :: Port80 Software { Expiration intervals can use any combination of time units including years, months, weeks, days, hours and minutes. For example, the following rule uses ...
Re: Configuring the time to expire on a image at a certain time ... It is also used to change the expiration of removable media in the .... more seconds to bring it up to the equivalent of 13 days + 20 hours. ...
[PATCH] --set-expire +&ParmString; must be one of the following: "0" +(meaning no expiration), a positive integer (counting the +expiration time in days from the creation time ...

Videos:
Little Polo the mouse :) Polo Everything seemed prefect, nothing could go wrong, a beautiful litter of cream babies was born on January the 10th 2008. And up until they were...
Markets Crash So much for the 'Bailout" solving everything. Utter pandemonium this week in the marketplace, even John Authers look on his face seems as though he i...
Steely Dan Battle (ROCK BAND 2 "EXPERT SCORE BATTLE") "If you don't have an online connection for PS3 or Xbox 360, you're going to miss out on a lot of the goodness in Rock Band 2. As anyone still playin...
Looming City Bankruptcy?; Online Searching Risks; Public Square: Minimum Wage What is the prognosis for San Diego's troubled financial future? City officials and residents alike are looking for answers. Days after news that San...
Beatles The Beatles Paul McCartney, Ringo Starr, George Harrison, and John Lennon Beatles Soundtrack (partials) 0:00 - 0:13 Twist & Shout 0:14 - 0:29 I Fe...
www.moldytoaster.com n, and I will read it again." Albert resumed his seat, and Beauchamp read, with more attention than at first, the lines denounced by his friend. "Wel...
White House Press Briefing by Tony Snow (01-17-2007) http://www.whitehouse.gov/news/releases/2007/01/20070117-5.html
www.moldytoaster.com at was the other day a crime is to-day a title to favor. You then served Louis XVIII., and you did not show any favor -- it was your duty; to-day you...
Zeitgeist, The Movie | Final Edition [ ENGLISH subtitles ] Zeitgeist, The Movie | Final Edition [ ENGLISH subtitles ]
www.moldytoaster.com rner or other." While the old man regretted, Marius applauded himself. As is the case with all good-hearted people, misfortune had eradicated his bi...




Search This Site:










masterpage and crosspagepostback

typeconverter - enum to string

min/max (visiblity) problem 3.2

how to create a copy of dotnetnuke portal with a different namespace?

migrating xml data island code from asp to asp.net

change fonts option

looking for help!

visual studio 2008 freezes when switching to design/split view

menu control does not work when placed into master page

verifying roles from login control and directing them to pages

who has this starter kit with sql server 2005 version

installation error - urlrewrite

dnnstore 3.2 released!

problem with uploading web application on iis 6.0

dnn 2.1.2 source errors in solpartmenu.ascx.vb

where's code for changing default page on login?

menu divider or seperator using css and or css adapters.

adding css/javascript for module controls

program won't associate with ie

how to applying a style sheet to contentplaceholder data.

guid field 'roleid' in dnn table 'aspnet_roles'

setting up sql server 7/2000 dependency caching

dnn and file paths

getting smtp to work with godaddy

new skin : my.msn.com meets dnn - drag and drop auto resize containers ( lotsa dhtml)

accessibility in asp.net / vs whidbey

css friendly control adapters: menu incremental expansion of items on demand (when they are clicked)

iframe module

server error in '/dotnetnuke' application.

how do i set the default country to u.s.?

 
All Times Are GMT