Feeds:
Posts
Comments

I m MOVED to woaychee.com!

Guys, I no longer update my post here. please go to http://www.woaychee.com/index.php/category/technical/ for the latest post.

GridView with Mailto

I wish to have an email hyperlink display for every email record display on the gridview.

here the sample code.

<

 

asp:TemplateField HeaderText=”Email” SortExpression=”Email”>

<ItemTemplate> 

<asp:HyperLink ID=”hylinkDtl” runat=”server” NavigateUrl=’<%#(Eval(“Email”, “mailto:{0}”))%>‘><%

#DataBinder.Eval(Container.DataItem, “Email”)%></asp:HyperLink> 

</ItemTemplate> 

<ItemStyle /> 

</asp:TemplateField>

Just to share I found out that’s a way to implement the strong password in DNN portal.

Open your WEB.CONFIG

Look for minRequiredPasswordLength and minRequiredNonalphanumericCharacters

Change the value.

Save it will do.

Wrote a simple  DNN Scheduler, deployed to Portal and then checked the status and it worked fine at the first place, but it stop working after the first execution.

Looking around then found a simple solutions.

Login as Host -> Host Setting -> Advanced Setting ->  Other Setting -> Scheduler Mode -> Timer Method -> Update it.

Tried to run the service and it worked well.

Audience: DNN Skin developer and DNN Skin UI developer

Objective: to reuse the User Control that you created in your DNN Skin project.

Case Study:
I created a skin for a company, this skin project included 4 x Skins, 4 x Containers.
Each Skin file we might use dnn:Login, dnn:User, dnn:Logo. Yes, so I have to put those control into 4 x skins.
But I face a problem in future, if I need to add/remove one of these controls, I NEED to modified 4 x files!
So I create another ASCX file, lets name it as “Header.ASCX”

Put those Controls into Header.ASCX, Here the sample code.

header.ascx content

header.ascx content

In those 4 files,
I register the Header.ascx control, then use it in respective files.

Home ASCX content

Home ASCX content

Guys, if you have time to check it out.
This article is related to SP in database server.
Credit to my team mate who found this.

http://furrukhbaig.wordpress.com/2007/08/22/stored-procedures-factssheet/

In my previous project, the application have 3 VIEW screens (the first page is add/update, 2nd page is confirmation page, 3rd page is success or fail error message page). I need to register 3 pages in the module defination and use Globals.NavigateURL to access those pages.

For instance, my 2nd Page call ConfirmationPage.acsx (i m registered the name as “Confirm” in Module defination)
My NavigateURL code will be Globals.NavigateURL(TabId, “Confirm”, “Mid=” + moduleId.tostring(), etc parameters);

In my current project, I m have 3 screens too, this time I create a frame called “Main.ascx”, My 2nd page let name it as “second.ascx” and the 3rd page we call it “third.ascx”, I m ONLY registered Main.ascx in module defination.

Create a “PlaceHolder” name it as phMain in Main.ascx page

in Main.ascx page load,

PortalModuleBase objPortalModuleBase = (PortalModuleBase)this.LoadControl("second.ascx");
objPortalModuleBase.ModuleConfiguration = this.ModuleConfiguration;
objPortalModuleBase.ID = System.IO.Path.GetFileNameWithoutExtension(m_controlToLoad);
phMain.Controls.Add(objPortalModuleBase);

Run your applications,
Your Main.ascx will load “second.ascx” in the page.
If you have a button in “second.ascx” navigate to “third.ascx”, in the Button Event put the code below,

Response.Redirect(Globals.NavigateURL(
TabId
, ""
, "ModuleID"
, ModuleId.ToString()
, "mctl"
, "third"
));

Do you see the different between these two examples?
In first example, we pass “MID” instead of “ModuleID”, also the 2nd parameter we put the page we want to navigate.

In second example, do you notice the “mctl”? It can be used when you create a frame to load the control dynamically.

I m faced this problem during setting up the Development Server Envirnonemt for DotNetNuke where web apps in Server A and Database sit in Server B. For more information, you can refer this link (If SQL Server is running on a remote computer and the Web server is running IIS 6.0, give the Web server's machine account login privileges on the remote computer. The machine account is referenced as DOMAIN\MACHINENAME$. by MSDN article)
I know I can solve this problem by creating a user login, but I do not wish to use User Login but windows account for security reason, putting user name and password in web.config is a not a good practice.

When I m try to launch the website, I got the Login Failed error message, checked in ASP.NET forums and other technical forums, finally I found this.

exec sp_grantlogin [domain\machineName]  which you can refer from this link

This solved my problem.

In my previous post, I wrote a post regarding Multiple Records Manipulation using SqlTransaction, but after discussed with the team. I should use TransactionScope in Business Logic Layer which we used to write the code in Controller class.

Here the example.

Must include this namespace  “System.Transactions”

public void AddMultipleUserSurvey(List<UserSurveyInfo> objUserSurveyInfoList, int userID)
        {
            using (TransactionScope objScope = new TransactionScope())
            {
                DeleteUserSurvey(userID);
                AddUserSurvey(objUserSurveyInfoList);
                objScope.Complete();
            }
        }

I m tried to insert an invalid data after the deletion, and it really rollback the records for deletion and insertion.

taking a simple example,your application is handling not only DELETE the existing record, at the same time, it INSERT multiple records after the DELETION in SINGLE method you code in Controller Class.

Imagine your create a simple survey form which consist of a checkboxlist which allow the visitor do a simple survey. (they can check one or more multiple checkboxes, so we need to create a method to LOOP in the insertion method)

This is the Controller Class.

sqltrx01

sqltrx02

DataProvider.CS

sqltrx03

SqlDataProvider.CS

sqltrx04

Older Posts »

Follow

Get every new post delivered to your Inbox.