Archive | Technical RSS feed for this section

article related to computer technology such as C#, DotNetNuke, ASP.NET etc

DotNetNuke DatePicker

Got a chance to look at DNN’s DatePicker yesterday, seem like it quite easy to implement.

in ASCX,

<asp:TextBox ID="txtStartDate" runat="server" AutoPostBack="true" Enabled="False"></asp:TextBox>
<asp:Image ID="imgStartDate" runat="server" EnableViewState="False" ImageUrl="~/DesktopModules/BCU/images/date.gif" />);

in CS,

string attrib = "";
attrib = DotNetNuke.Common.Utilities.Calendar.InvokePopupCal(txtStartDate);

this.imgStartDate.Attributes.Add("onClick", attrib);

But bear in mind, please use image instead of image button. When on click, the date value will automatic bind into textbox. Super Simple!

Incoming search terms:

DotNetNuke.Entities.Tabs

in my previous post, I blogged about NavigateURL from view page to edit or another view page in the same module.

what if i want to navigate to other module? For better understanding, From DNN Module A to DNN Module B, both module doesnt related to each other.

Ok, first we need to import the Namespace “DotNetNuke.Entities.Tabs”

Declare the object and use it shown as below,

TabInfo objTab = new TabInfo();
TabController tabCtrl = new TabController();
objTab = tabCtrl.GetTabByName("ModuleB", PortalId);
this.Response.Redirect(Globals.NavigateURL(objTab.TabID), true);

Yes, now you can navigate to other module.

Incoming search terms:

output param using SqlHelper.ExecuteNonQuery

in case you develop the DNN module using SqlHelper.ExecuteNonQuery which involve parent and child table, and you wish to grab the parents identity for child table manipulation. It always return null, so please use another API which is SQLHelper.ExecuteScalar(),

when you want to return the output param in sp! remember to CAST it as integer! Or else the value return will become “NULL”.

SELECT CAST(scope_identity() as int) ;

Incoming search terms:

ASP.NET RadioButtonList bind enum & display direction

If you wish to bind a simple data such as “Inactive” & “Active” using the asp.net radiobuttonlist, you can try out this way.
C# Code,

public enum Status
{
active,
inactive
}
RadioButtonList1.DataSource = Enum.GetValues(typeof(status));
RadioButtonList1.DataBind();

ASPX page,

<asp:radiobuttonlist runat="server" id="RadioButtonList1">
</asp:radiobuttonlist>

How to display the radiobutton horizontal? usually the radionbutton will display vertical, so simply add RepeatDirection=”Horizontal” inside the radionbuttonlist tag

simple example as below,

<asp:RadioButtonList ID="rbtnStatus" RepeatDirection="Horizontal" runat="server"></asp:RadioButtonList>

Incoming search terms:

DotNetNuke SOLPARTMENU attribute

This is a challenge to apply the CSS for DNN’s solpartmenu. Hope this link will help some of you if you want to change the style of default solpartmenu.

Here the link : http://www.skincovered.com/dnn-menu.aspx

I have a nightmare to figure out the SolPartMenu Style!

Do pay attention with those CSS I listed below! If you want to customise your solpartmenu! Use those CSS class name offered by them!

.MainMenu_MenuContainer{}
.MainMenu_MenuContainer td{}
.MainMenu_MenuIcon{}
.MainMenu_RootMenuArrow{}

.MainMenu_MenuBreak{}
.MainMenu_MenuArrow{}
.rootmenuitem{}
.rootmenuitem td{}
.rootmenuitem td span{}
.rootmenuitembreadcrumb{}
.rootmenuitembreadcrumb td{}
.rootmenuitembreadcrumb td span{}
.rootmenuitemselected{}

.MainMenu_MenuItem{}
.MainMenu_MenuItem td{}
.submenuitembreadcrumb{}
.submenuitemselected {}
.submenu {}

Globals.NavigateURL()

Globals.NavigateURL() allow you to navigate from 1 page to another page, also a parent page to load another children control.

This Example is to navigate to another page call Details

Globals.NavigateURL(TabId, "","mid", "1","CourseID", "2","ctl", "Details", "");

Next,  is to navigate to another child control call Details

Globals.NavigateURL(TabId, "","mid", "1","CourseID", "2","mctl", "Details", "");

Incoming search terms:

Inter Module Communication in DNN using C#

Well, this post I will share with you my finding about the DNN IMC, something like you want to pass 1 or more values from one module to another module, imagine you created 2 modules, one is search module another one is result list module. You type something in search module and hit “go”, the value from search module will pass to result list module, for instance.

OK, stop the crap. Read More…

Related Posts with Thumbnails

Incoming search terms:

Get Adobe Flash player