| Vincent's profileInfinity aka VincentPhotosBlogLists | Help |
|
|
December 29 new blog !I have finally manage to get my new blog running here http://www.vincentpang.ws October 23 What's wrong with my CSSConverted 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 LogI 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 AtlasUpgraded 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 = AJAXJust 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 2005was 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 August 17 Hard Disk DriveI was trying to fix an Acer Aspire P4 1.7Ghz. First time i boot up, the HDD partition was gone. Suspect virus, MBR corrupted. So try formatting the HDD, and the formatting took 3 hours to reach 40%. Second suspect hdd dead. Took out the HDD, try to boot up to make sure everything is still in place. DING ! damn it doesn't power up ! hit the power button a couple of times, jump the power switch, change the power supply to no avail! took me about 30 minutes. So i put back the HDD, hit the power button. DING ! fans running it's powering up !
Swap in the 160GB just to make sure the mobo can detect a 160GB drives. 160GB and a 80GB is difference by less than US20.
WTF ! in my 15 years of assemblying and fixing computer, i have never come across a computer that doesn't boot when there's no HDD ! this is because normally for a new piece of computer, i'll snap in the proc to the mobo, and power supply and power up. Then only come the RAM and VGA. Then only for into the chassis, hdd, CDROM and tiding cable. I can still remember back the old days when my PC runs on those 5.25" floppy with no HDD.
July 06 MYOB Hacked !It's 2am in the morning. I just came back from my friend's company. Wondering what caught me up so late? Eventually the Income tax people are coming to my friend's office tomorrow to check on their accounts.
However, they are having problem retrieving some of their old information from the 3.5" disk. At first, i thought those disks were not been used for too long and could have develop some fungus that block data reading. Contrary,it is not. It was the password problem.
They called up the MYOB guy. The guy came earlier but they have no idea how to access it. Asked the accounts people, they said they use only 1 password, the same one as the current one. The way they are telling you is like you can't do it. Forget it, there's something wrong with the system. Cause since the expert from MYOB failed to do it.
Tried a couple, no avail, so it's google time. Manage to download a couple of sharewares which can retrieve part of the password, and in order to get the full password, you'll need to buy it. One of it was good enough that it only have 4 digits and 2 front digits were exposed. I easily figure that out.
The other one is a bit messy. It said no password, but yet it's asking for password. Something is missing. Try a couple, no avail. With a couple of try and error, BINGO ! Oh, at that point, i just feel so cool :)
Then the rest of the time was helping them to print the doc out. They starting printing at 9am in the morning. Up to 10pm, the pathetic dot matrix printer printed 400+ pages. I saw an old Lexmark Laser Printer, checked and it's working. In addition, it's hook out to the network (luckily they have networking). Send those files i just opened to printers and it printed 600+ pages / hour. That's almost 10 ppm. Printed all account statements from 2000 to 2003 in less than 3 hours :) June 08 Encarta in your MSNI forgot where I got this, i'll give credit to him if i recall. She appears in ur MSN, just like any other contacts. But she's not a human, she's a bot (robot)
You can ask her questions and she'll reply u. She'll reply in a chat with a small info if she is really sure about the result and then send u an invitation to start Encarta (just like starting a chart or a game request).Starting the encarta session, you'll get a windows on your right which pull information from a website.
Besides that, i found that she has some sort of intelligent spell check too. I type in 'Steven Spielberg' and 'Steven Speilberg', and it brings me to the same page. She recognise that spielberg and speilberg.
well, well, before i sign off, her msn is encarta@conversagent.com
edit: they have changed to encarta@botmetro.net June 05 Microsoft Excel Cannot Open Same Filename (different folders) ?Ok here is the situation. 2 xls files with the same filename in different folders
C:\live\book1.xls
C:\prod\book1.xls
I was shocked when i was doing a demo of copy paste and POP ! a msg appeared
A document with the name 'book1.xls' is already open. You cannot open two documents with the same name, even if the documents are in different folders.
To open the second document, either close the document that's currently open, or rename one of the documents.
I have posted this question up to a couple of forums. Some of them guess that it creates a temp file and thus cannot use the same filename as it will crash and some replied that it could be some cell linking feature that doesn't allow this. But i think this is kinda stupid. This doesn't happen in Microsoft Word. WHY ?
How if i cannot rename any of the files ? I will need to create a temporary xls to do all the copy paste ? This is plain stupid. March 17 Free 2GB in my Hotmail !I got free 2GB in my hotmail today ! Photo attached. If u want to know how, drop me a comment and i'll tell u how December 14 auto add task to Task List in vs.net 2003just in case you do not have the Task List shown, you can bring it up by 2 ways
1) Ctrl+ Alt+ k
2) View->Other Windows->Task List
It's a handy tools where you can keep track of the project. It keeps the priority, description, file and also line. There are couple of ways u can
1) in the Code behind type in 'TODO <desciption> and it will automatically adds into ur task list. Double click on the task and it will automatically bring u to where you have key in the 'TODO earlier. 'TODO is a key word and you can even add more to it at Tools -> Options -> Environment -> Task List. Type in a name and click 'Add'. Ok here's the problem, for some reason, 'TODO will not work for first time. You need to do step (2) below then only this auto add to task list will work. A bug maybe ?
2) Click on 'Click here to add a new task' and add the desciption. However, if you do that, you will not be able to keep track of the file and line. November 16 VS.net 05, SQL 05, BizTalk 06 Launch in MalaysiaThe launch was held at KL Convention Centre. For some reason, they serve breakfast and lunch this time around which they normally don't (as far as i'm concerned on all those free admission events Microsoft has held over the years). Food was decent (better than nothing), good event organiser, and the venue is nice (maybe because it's still new).
The guest of honour was none other than the CEO of Microsoft, Steve Ballmer. He came at around 9.40 am and delivered a 30 minutes speech. Then a demo around 40 - 50 minutes by another guy while Steve was at his side.
Steve ended earlier than expected around 10.40am, and so I got like 3 hour break before the next session. While wondering around, found this booth, MSDNConnection booth. Yeh, i was a member thought they r going give some freebies and ding ! they did give freebies... but only to newly registered ! i was like WTF.
I found the launch to be successful because after looking at the new features it's offering... it make me wanting to install it October 26 SQL Server Practitioners Alliance Network (SPAN)Went to SPAN first event after work (25 Oct 05) at Microsoft, KLCC. Despite the long rain, a crowd of around 25 turned up. Light dinner was served. At the door, I met Ramesh, whom handed me a copy of SQL Server 2005 Developer Edition September preview and an invitation to the morning session of VS2005, SQL 2005 and BizTalk 2006 Launch day on 15 November. Was told that the invitation was an exclusive to meet someone special from Microsoft. Let wait and see who he is
The session started by Ramesh and then he invited 2 SQL MVP namely Alex and CK. They gave a brief walkthrough of the SPAN community and it's objective. Then Ramesh, gave a walkthrough of the website. After that everyone attended the session introduce themselves. I saw someone talking pictures yesterday, let see if they updated the website so i can link it here.
SPAN has manage to be an Offical Chapter in PASS (http://www.sqlpass.org/). It's a community to answer all your question, clearing your doubt and help you to troubleshoot anything related to SQL Server . I do strongly think that we need a community for SQL Server not only for DB Admin but also for developer. Having a DB in a system is a norm nowadays in which i would say 99% of the system will have at least a DB.
Visit span today http://www.span.com.my October 14 dim strString(1) as String ?dim strString(1) as String
this statement will basically declare an array of string size 2 which can be accessed by strString(0) and strString(1). But wat i would like to comment is why not dim strString(2) as String instead ? whether the array starts with 0 or 1 is not relevant to the declaration. It should be strString(2) which means it has 2 strings instead. That would be alot easier to understand.
well potential problem i might spot if u use dim strString(2) as String is ppl tend to use for i=0 to n instead of for i=0 to n-1. But then again, the way we program shouldn't affect the way declaration SHOULD be done. Anyone got any comment ? Visual Studio hangs/locks when pin/unpin ToolboxI was rushing this morning to fix something. Need to get a couple of labels, textboxes and buttons fast and working. Hit on the Pin Toolbox so it doesn't hide itself and it hangs ! Crap ! it has been happening quite often. Do some google and found an article here http://groups.google.com/group/microsoft.public.vsnet.ide/browse_thread/thread/18ddc078df86bd9/53b4f84dd78c03e8?tvc=2&hl=en#53b4f84dd78c03e8
Looks like it's a bug in .Net Framework 1.1 SP1. According to the article, Server Explorer is initialized when Pin (althought not visible) and thus hang. So it's the Server Explorer that hangs not toolbox
Solution:
Take it out from the left bar and put it on the right. And problem is gone
September 07 new apps !1) a .net web services which allow upload files (done)
2) an app to read xml as dataset (done)
3) a class to catch log then read xml for setting and insert to either sql server, access/other's db or flat file (pending) September 06 DNNDownloaded DNN 3.1.1 installed on my local machine. They are getting better i have to say. Much better than 2.0.4 that i have previously. Now i'm interested in developing new modules for it. |
|
|