I have a column called FileName with values such as “100.wmv, 200.wmv, 999.wmv”, but i just want to display “100, 200, and 999″ without wmv extension.
so I just use substring to solve the problem
select substring(FileName, 1, 3) as FileName from [TableA]
Here the explaination to use : SUBSTRING(string to manipulate, start index, length of string to [...]
Archive for January, 2008
substring for MSSQL
Posted in MSSQL, tagged SQL on January 30, 2008 | Leave a Comment »
Send Email Using DotNetNuke Framework?
Posted in ASP.NET 2.0, DNN Deployment, DNN Module Development, DotNetNuke v4, asp.net, dnn, dotnetnuke, tagged ASP.NET 2.0, dotnetnuke on January 22, 2008 | 4 Comments »
Since I m using DNN to built module, I m also wish to utilize as much as possible from DNN framework.
To send Email, I m just simply use API below
DotNetNuke.Services.Mail.Mail.SendMail
A single line of code to solve a problem. Here the simple example I used :
DotNetNuke.Services.Mail.Mail.SendMail(FromAddress, SendTo, “”, Title, output.ToString(), “”, “”, “”, “”, “”, [...]
extending Enum
Posted in ASP.NET 2.0, asp.net, tagged asp.net on January 16, 2008 | Leave a Comment »
Today I m faced a problem when I want to re-use Enum without major change on the based code.
Here the simple example,
I got a drop down list which bind Enum, here the sample code:
public enum Gender
{
[Description("I m a Male")] M,
[Description("I m a Female")] F
}
if you just bind the Enum, your dropdownlist will simply show you [...]
Checkout DNN’s Skin Control
Posted in ASP.NET 2.0, Active Directory, DNN Deployment, DNN Module Development, dnn, dotnetnuke, tagged Active Directory, DNN Skin Control, SSO on January 16, 2008 | Leave a Comment »
Finally I got a chance to check out DNN Skin Control (no choice, my task is to fulfill customer requirement),
When I m want to implement SSO in DNN, I got to customise the “User” control, disable the hyperlink allow them access the user profile page to do some funny stuff.
If you want to know more about Skin Control, here the directory path.
DNN’s Skin Control [...]
Tips to control DNNTabStrip’s tab to display on page load
Posted in ASP.NET 2.0, DNN Deployment, DNN Module Development, DNNTabStrip, DotNetNuke v4, asp.net, dnn, dotnetnuke, tagged DNNTabStrip on January 7, 2008 | Leave a Comment »
I just discovered that DNNTabStrip can be controlled.
I got 4 tabs on the page, which is Tab A, Tab B, Tab C and Tab D.
When I m click Tab B, System will navigate to Detail page of B, then I click Back button, it will return to Tab A but not Tab B by default, [...]