HomeHomeUsing DotNetNuk...Using DotNetNuk...Skins, Themes, ...Skins, Themes, ...retrieve values ​​(day, month and year) <dnn: currentdate ???retrieve values ​​(day, month and year) <dnn: currentdate ???
Previous
 
Next
New Post
4/27/2012 11:19 AM
 

Hi,

in the skin's file .ascx  how can i have :

- the value of the day in on variable  

- the value of the month in on variable

- the value of the year in on variable

from :

<dnn:CURRENTDATE runat="server" id="dnncurrentdate" DateFormat="dddd dd MMMM yyyy" />
               
PLEASE does anyone can help me ...

for the purpose of using these three variables in a program test javascript (in my home page ) ...

Regards

 
New Post
4/28/2012 4:06 AM
 
if you just want the text you may use a hidden display in a DOM element, you are able to access from the client, on the server you may use code behind to access current time. Can you be more specific about your needs?

Cheers from Germany,
Sebastian Leupold (DotNetNuke MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group   European Network of DotNetNuke Professionals

 
New Post
4/28/2012 8:00 AM
 

Hi, Thanks for reply

ok, 

 

For exemple :

 

In my file skin.acsx i have :

 

<dnn:CURRENTDATE runat="server" id="dnncurrentdate" DateFormat="dddd dd MMMM yyyy" />

 

That display in my home page :

Saturday 28 April 2012

 

So , now : i add a text/html ‘s module in my home page to execute some test (in javascript)

 

Some thing like:

If (var_day == ‘28’)  ldquo;Some text …”);

If(var_day == ‘1’ && var_month == ‘july’)  ldquo;it’s the month of your birthday”);

 

… some stings like this …

 

But to do these things I have to collect the day, month & the year from the date (or from currentdate) to be used in my js ‘s programme

 

If I know this thing , I can do the same thing in canendar arab (to alert the important days in the year)

 

So , can you show me how to do or an idea about my question PLEASE

Cheers

 
New Post
4/28/2012 8:39 AM
 
In a script block you should be able to write somthing like...

var dd =  <%= DateTime.Now.Day %>;
var mm = <%= DateTime.Now.Month %>;

...to get the values from the server into js variables.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
4/28/2012 8:42 AM
 
Sorry - annoying editor took out the important bits. View the answer on the site.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeUsing DotNetNuk...Using DotNetNuk...Skins, Themes, ...Skins, Themes, ...retrieve values ​​(day, month and year) <dnn: currentdate ???retrieve values ​​(day, month and year) <dnn: currentdate ???


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Start  Professional Edition Trial
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.