Vincent's profileInfinity aka VincentPhotosBlogLists Tools Help

Infinity aka Vincent

a typical Malaysia web developer lifestyle
December 29

new blog !

I have finally manage to get my new blog running here http://www.vincentpang.ws
December 05

The music revolution

1996
source of music: Radio & CDs
Internet connection speed: 28.8Kbps
Download time: ~30 mins / song
Tools required: Media Player, Winamp
Quality: CD/Radio, unreliable
 
2001
source of music: Pirated CDs, websites, Kazaa, mIRC, some P2P
Internet connection speed: 56.6Kbps
Download time: ~15 mins / song
Tools required: Media Player, Winamp
Quality: CD/Radio, more reliable
 
2005
source of music: Pirated CDs, Bittorrent
Internet connection speed: 512Kbps (ADSL Broadband)
Download time: < 5 mins / song
Tools required: Media Player, Winamp, foobar
Quality: High Quality CD, Loseless
 
2007
source of music: imeem.com
Internet connection speed: 1Mbps (ADSL Broadband)
Download time: 0 sec. online music streaming
Tools required: Flash + Browser (which is common on all desktop)
Quality: CD
 
Summary:
As you can see from the milestone, as broadband has reached out to more users and become more affordable, megabytes can be transferred in second. It's as easy as tuning in to the radio just like the good old days, but with the choice of music you like to listen to. Almost CD like quality and you become the 'station manager' and decide wat you want to listen.
October 23

What's wrong with my CSS

Converted one of the asp.net 1.1 project to asp.net 2.0. Everything work fine. That's good, until i add a new page. The CSS doesn't seems to be working. (see picture before_replace.jpg). Found the problem was the header text
 
Original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
Changed to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
You can see in the picture (after_replace.jpg) that it is working fine after i replace it.
 
Anything not working, i'll be looking for the difference in the header now. First it was AJAX, not it's CSS.
October 09

Shrink MS SQL 2000 DB Log

I was trying to reduce the size of the log in the db for MS SQL 2000 recently. Tried shrinking via sql manager but to no avail. Google around and finally found it.
 
use <db_name> backup log <db_name> with truncate_only
dbcc shrinkfile (<db_name>_log, truncateonly)
 
transaction Log is down to 1MB after executing the above in SQL Query Analyzer
September 27

Problem Upgrading Existing Pages to AJAX Enabled Using Atlas

Upgraded one of my asp.net 1.1 to asp.net 2.0 recently. Following the instruction here on how to install Atlas to existing web pages found here http://atlas.asp.net/docs/overview/install.aspx
 
Add a new page. It works perfectly. However, i'm having problem with the existing web pages. It gives me a popup with the msg 'Unknown error'. Spend 3 hours debugging and finally i found the difference. There seems to be a problem with the <meta> in the <head> tag
 
Original (the one giving me problem)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head runat="server">
    <title>WebForm3</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
    <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="
http://schemas.microsoft.com/intellisense/ie5">
</head>
 
Changed to:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head runat="server">
    <title>WebForm3</title>
</head>
 
Problem solved !
September 22

ASP.Net 2.0 + Atlas = AJAX

Just install Atlas, to enable asp.net 2.0 to have AJAX.
 
Was playing around with ModalPopupExtender, a component in AJAX that come with the Atlas control kit. Looks cool, and suddenly, stuck on how do i invoke the 'Ok' button. The sample was rather simple, a label, a popup and a button to return text into the label as below
 
        <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
        <atlas:UpdatePanel ID="updatePanel2" runat="server" Mode="Always">
            <ContentTemplate>
                <asp:Label ID="lTest" runat="server" Text="NoneSet"></asp:Label>
            </ContentTemplate>
        </atlas:UpdatePanel>
   
    <atlas:ModalPopupExtender ID="MPE" runat="server">
    <atlas:ModalPopupProperties
        TargetControlID="LinkButton1"
        PopupControlID="Panel1"
        BackgroundCssClass="modalBackground"
        DropShadow="true"
        OkControlID="OkButton"
        OnOkScript="javascript:__doPostBack('OkButton','')"
        CancelControlID="CancelButton" />
    </atlas:ModalPopupExtender>
    <div style="display:none">
        <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Height="100px">
                <p>Are you sure you want to proceed?
                <asp:Button ID="OkButton" runat="server" Text="Yes"></asp:Button>
                <asp:Button ID="CancelButton" runat="server" Text="No"></asp:Button>
                </p>
        </asp:Panel>
        </div>

    Protected Sub OkButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles OkButton.Click
        lTest.Text = "ok, your wish is my command, i'll proceed now"
    End Sub
 
The trick seems to be to use a javascript to call the OkButton as below
javascript:__doPostBack('OkButton','')"
 
Atlas can be downloaded here, http://atlas.asp.net
Atlas ToolKit can be downloaded here, http://atlas.asp.net/atlastoolkit
 
September 08

VWD + SQL Express 2005

was having a problem trying to attach/add a db file of SQL Express 2005 to the Visual Web Developer 2005 Express App_Data. The error is as below:
 
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
 
It seems like VWD 2005 failed to find a valid SQL Express 2005 installed. This doesn't happen to my PC at home. The difference is my PC at home has SQLExpress installed as default instance where my office PC has it as MSSQLServer.
 
Solution:
 
in VWD
Tools -> Options -> Database Tools -> Data Connections (make sure show all settings at the bottom left is checked)
 
SQL Server Instance Name (blank or default): <change it to the instance of your SQL Express> or blank in my case because i do not seems to have an instance name
 
Picture attached as example
 
and it fixed my problem
 
Photo 1 of 6
More albums (1)

Vincent Pang

Occupation
Location
Interests