Feeds:
Posts
Comments

Archive for November, 2007

Searched around and I found this.
<PARAM NAME=”EnableContextMenu” VALUE=”false”> or EnableContextMenu=false in the embed tag will do to disable the right click.

Read Full Post »

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. [...]

Read Full Post »

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 [...]

Read Full Post »

I m just tried out the DNN TabStrip, working as charm when switching the tabs (with html control such as textbox), but when I m start to bind a gridview (asp.net server control) for 3 tabs, it stop to work, it just simply disable 2 tabs after I clicked the gridview to sort the column, I [...]

Read Full Post »

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 [...]

Read Full Post »

Active Directory for DNN4.6.2 doesnt install automatically, so you need to install it yourself by login as Host Account, go to host setting -> Authentication Setting -> click “install New authentication System” -> go to “%DNN DIR%\Website\Install\Package”, (before that please change the “ActiveDirectory_01.00.00_Install.resources” to “ActiveDirectory_01.00.00_Install.zip”), and then install it.
To Configure the AD in DNN, follow [...]

Read Full Post »

If you got experience in developing DNN Module, most of you will know what IActionable is, I m created my own button from ViewPage, and I wish to access EditPage from ViewPage by simply using code below in code behind,
Response.Redirect(EditUrl(“”,”",”Edit”));
Yes, notice the 3rd params? When you register the new module defination, you need to put [...]

Read Full Post »

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 [...]

Read Full Post »

Finally I got a chance to explore DNN:PagingControl, you need to play around with the trick (yes, not that straight forward as compare with out of box asp.net gridview control).

for StoredProcedure,
Create procedure [dbo].[tbl_X_GetAll]
@portalId int, @CurrentPage int,@PageSize int
as
CREATE TABLE #TempTable (
ID int IDENTITY PRIMARY KEY,
creditTypeId int,
portalId int,creditType varchar(100),
isActive bit
)
BEGIN INSERT INTO #TempTable (
creditTypeId,
portalId,
creditType,isActive)
SELECT
creditTypeId, portalId,
creditType,
isActive
FROM dbo.[tbl_x]
WHERE [...]

Read Full Post »

This is very important if you want to have a namespace for your DNN module.
Both ASCX and it’s code behind must have same namespace or else you will spent some times to figure out.
Here is it.
in ASCX file,
<%@ Control language=”C#” Inherits=”YourCompany.Modules.ProjectName.Admin.MyProfile” CodeFile=”MyProfile.ascx.cs” AutoEventWireup=”true”%>
in CS file,
namespace YourCompany.Modules.ProjectName.Admin{partial class MyProfile : PortalModuleBase, IActionable{

Read Full Post »

Older Posts »