Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Urgent help required in using tab controller classUrgent help required in using tab controller class
Previous
 
Next
New Post
1/11/2006 7:56 AM
 

Hi dnn experts,

I am developing a module using DotnetNuke4 and Asp.net2.0.My problem is in accessing the end date of tab.Whenever i access the Startdate and Enddate of tab,it shows following on printing it

Start date:1/1/0001

End date:31/12/9999

But the problem arises when i try to access the Startdate and Enddate of its child node(which i have calculated by using GetTabsByParentId(tId2) stored procedure where tId2 is tabid of parent tab,it shows

Start date:1/1/0001

End date:1/1/0001

My problem  is where are these dates coming from when there is null entry in database,are these values hard coded anywhere in DNN coding.

Secondly why is end date different in case of parent tab and child tab.I want to set access rights on basis of this end date.Can anybody help....................A part of my coding is given below for your reference

Response.Write("--Parent--" + tabInfo2.EndDate.ToString() + "<br>");//Here the result comes out to be 12/31/9999

if (tab.HasChildren)//check if children present

{

DotNetNuke.Entities.Tabs.TabController tabController2 = new DotNetNuke.Entities.Tabs.TabController();

//get all children of this parent

foreach (DotNetNuke.Entities.Tabs.TabInfo tabInfo2 in tabController2.GetTabsByParentId(tab.TabId))

{

Response.Write("--Child--" + tabInfo2.EndDate.ToString() + "<br>");//Here the result is 1/1/0001

 
New Post
1/14/2006 8:06 PM
 
The 1/1/0001 is the Null value for a Date (it is actually the value of DateTime.MinValue - the smallest date that the DateTime object can store.

The 31/12/9999 is the largest value the DateTime object can store.

They are set in the following code in GetPortalSettings (which loads all the Tabs)

PortalSettings.vb (line 539) - DotNetNuke 4.0.2
                        If Null.IsNull(objTab.StartDate) Then
                            objTab.StartDate = Date.MinValue
                        End If
                        If Null.IsNull(objTab.EndDate) Then
                            objTab.EndDate = Date.MaxValue
                        End If


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Urgent help required in using tab controller classUrgent help required in using tab controller class


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out