Read, With the Name of Your Lord Who Created

Hibernasi Yang Entah Kapan Berakhir

Posted by triaslama on June 7, 2009

Selama beberapa bulan ini saya tidak mem-posting tulisan apapun dalam blog ini (kecuali mungkin membalas comment yang perlu tindak lanjut).

Saya memang pernah mengira bahwa mungkin saya akan berhenti ‘sesaat’ (rencana awal memang pinginnya berhenti sesaat), tapi kok malah agak keterusan. Dalam masa hibernasi kedua ini jadilah blog ini tanpa perhatian dan penambahan isi dari empunya…

Kemungkinan masih akan begini, karena sepertinya hibernasi saya dari nge-blog belum berakhir.

Posted in Six Sense | Tagged: , | 8 Comments »

ASP.NET Validation Controls: How to Disable It

Posted by triaslama on December 2, 2008

Validating an input is a common need, sometimes we want a field must be filled, a field must be in a specific range, or an input must follow a special pattern. ASP.NET has a bunch of validation controls that make our job a little bit easy. Despite all of the ease of use offered by ASP.NET validation controls, sometimes -just maybe- we need to disable it.

One important thing we must if we use ASP.NET validation controls is: what actions will trigger validators? One of the answer is button click! (The other maybe Postback action). With that in mind, we can take a conclusion that every click event of asp.net button (<asp:Button />) by default will always trigger validation controls to take the appropriate action.

Let’s say I want to disable RequiredFieldValidator against a TextBox control for one action, and enable it for another action, how can I accomplish this? Consider I have textbox control and two button controls (previous button and next button accordingly). I want if previous button clicked it goes to previous page and doesn’t fire the required field validator. Well, the solution is really simple.

Read the rest of this entry »

Posted in ASP.NET | Tagged: , , , , , | 14 Comments »

Error “‘Sys’ is undefined” in Asp.Net Ajax

Posted by triaslama on November 29, 2008

When I try ASP.NET Ajax in my development server I get this Javascript error: “‘Sys’ is undefined“. This error occur because I place <asp:ScriptManager runat=”server” /> element in my page.

Wondering why, I search in internet and hope that I will find one of the solution. After several trial and error finally I can find the solution and it work just fine for me.

To solve the error we need to modify web.config file, add the following under <system.web />

<httpHandlers>
<add  verb=”GET,HEAD” path=”ScriptResource.axd” type=”System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
</httpHandlers>

Nothing more I can say, but if you get the same error when you work with ASP.NET Ajax try the above solution, and I hope this help.

Posted in ASP.NET, Javascript | Tagged: , , , , , , , | 14 Comments »

How To: Include File in ASP.NET Pages

Posted by triaslama on November 19, 2008

Sometimes programming its just the matter of style, I am not generalize but often I found that we can achieve one goal through many different ways. Lets inspect one of those! By right now I have try three different way on how we put a file in ASP.NET pages. I don’t know which one is the best, but all of the three has the same meaning: we can refer to a file and bring it where ever we like in our ASP.NET pages.

Yes, this is maybe the prefered way because if we include a file and we place it in all of pages -let’s say copyrights footer for example- Later if we want to change the copyrights with the new one, or modify it to something we want, we simply modify it in one place (in our referenced file) rather than go through all of our pages and change it one by one.

How we do this? I have tried three solutions to do that.

1. Using <!– #include file=”[filename].aspx” –>
The first (and maybe the old one) we just write a simple script (as show above) and specify the file we want to include. Place the above script where ever we want content of [filename].aspx appear in pages that referenced it. For security reason always try to include only *.aspx files.
Read the rest of this entry »

Posted in ASP.NET, Programming | Tagged: , , , , , , | 9 Comments »

App.config And Web.config, The Two Configuration Files Story

Posted by triaslama on November 12, 2008

In .NET programming world we govern setting for our program through configuration file (file with .config extension). We use web.config for web application (ASP.NET) and app.config for the rest.

Although both of config files share much similarities but both has difference too. Yes, I realize that many of you maybe already know what is the difference, but I wrote this because just a moment ago I realize one of the difference.

In ASP.NET we can just drop our web.config file in root of our virtual directory and this file will be referenced automatically, as simple as that. When we use app.config file -for example in Windows Forms application- the app.config file need to renamed with the same name as our executable file (or *.dll file for library). In visual studio this thing happen automatically, so when I try it manually (without any of IDE) the problem arise.

I write a very simple Winforms application (lets say I give this Winforms app. as test.cs), I write app.config file too then I place this app.config in the same directory with my simple Winforms program. Inside my Winforms program(test.cs) I retrieve a value from app.config file. Then I compile my source code manually (with csc command, so it will produce test.exe) and I run it. Unfortunately I get NullReferenceException! “Oh no, what was already happen. I think I’m not do something strange” maybe something like that I muttered.

Yes, I am not do something wrong except because I retrieve value from app.config! Suddenly I realize that my app.config cannot referenced by my executable file (test.exe) automatically (like what will happen in web.config case). Because I feel it’s strange (It work when I use Visual Studio but doesn’t work when I manually compile it) I inspect my Visual Studio files and I open bin directory. Finally I found this: the config file (app.config) renamed automatically by Visual Studio with the same name with my *.exe file, but with *.config extension.

Oh, so this is the matter. the *.exe file (or *.dll file) referenced config file automatically as long as the config file has the same name. So I rename my app.config become test.config, run again my test.exe and yes now it works.

Posted in Programming | Tagged: , , , , , | 1 Comment »

Ada Saja Alasan Untuk Malas Update Blog

Posted by triaslama on November 2, 2008

Perlu saya tekankan bahwa ini bukan pembelaan diri dari saya karena sudah beberapa saat (beberapa minggu) blog ini tidak ter-update. Ada saat dimana kita menjadi sangat enggan untuk meng-update blog, merasa bahwa update blog itu terkadang hanya buang – buang waktu, merasa bahwa banyak hal yang lebih penting dari sekedar update blog. Belakangan ini saya sedang mengalami hal tersebut.

Sehingga jadilah blog ini tanpa perubahan isi sama sekali selama berminggu – minggu, saya sendiri berharap masa itu akan segera (bahkan kalau bisa sudah) berakhir.

Ditulis di Jakarta pada suatu pagi ***  Tri Sugiyantowo.

Posted in Six Sense | Tagged: , | 2 Comments »

Deklarasi Ramadhan

Posted by triaslama on August 30, 2008

Through this blog I beg your pardon for every mistake that I have made, whoever and wherever you are.

Berkaitan dengan akan datangnya bulan suci Ramadhan tahun ini maka saya, Tri Sugiyantowo, meminta maaf sedalam – dalamnya kepada semua orang yang terjangkau oleh blog ini.

Tidak selamanya perkataan ini benar, pikiran pun terkadang salah. Jika selama ini ada posting-an yang dianggap menyinggung perasaan atau malah dianggap menyakitkan hati (mudah2an tidak) saya meminta maaf sedalam – dalamnya atas hal tersebut. Saya minta maaf juga kalau selama ini mempunyai kesalahan kepada saudara/i, adik, kakak, bapak, ibu, dan para pembaca semuanya.

Semoga kita memasuki bulan suci ini dengan perasaan lapang, hati yang gembira dan penuh penantian. Semoga kita diberi kekuatan untuk mengisi bulan suci ini dengan segala amal perbuatan dan ibadah yang bermanfaat, yang mendatangkan ke-Ridho-an Allah SWT. Semoga kita meninggalkan bulan suci ini dengan predikat sebagai manusia yang lebih bertakwa, manusia yang lebih baik dari sebelumnya.

Amiiiiiinnnn….

Posted in Six Sense | Tagged: , , , | 1 Comment »

Rahasia The Baltimore Bullet

Posted by triaslama on August 30, 2008

Michael Phelps

Michael Phelps

Michael Phelps (nickname: “The Baltimore Bullet“), atlet yang paling banyak memperoleh medali emas di olimpiade (dalam dua olimpiade Phelps mengumpulkan 14 medali emas. 6 di olimpiade Athena 2004, dan 8 di olimpiade Beijing 2008. Selain itu dia juga memperoleh dua medali perunggu dalam olimpiade Athena). Dalam lintasan kolam renang Michael Phelps dapat dikatakan sebagai puncak dari piramida perenang saat ini. Medali emas yang dikumpulkan oleh Michael Phelps bahkan masih jauh lebih banyak dari seluruh medali emas yang berhasil dikumpulkan seluruh atlet Indonesia di sepanjang sejarah keikutsertaannya di Olimpiade.

Kecepatannya di kolam renang tidak perlu diragukan lagi, berkali – kali dia memecahkan rekor dunia atas namanya sendiri (saat ini Phelps memegang tujuh rekor dunia di lintasan renang). Simak komentar Mark Spitz (perenang yang memenangkan 7 medali emas pada olimpiade 1972) – dikutip dari Wikipedia:
Epic. It goes to show you that not only is this guy the greatest swimmer of all time and the greatest Olympian of all time, he’s maybe the greatest athlete of all time. He’s the greatest racer who ever walked the planet.

Read the rest of this entry »

Posted in Miscellaneous, Six Sense | Tagged: , , , , , , , , , , | 1 Comment »

I Am Not The Special One

Posted by triaslama on August 21, 2008

Saya masih ingat ketika Jose Mourinho -pelatih klub sepakbola Inter Milan dan mantan pelatih Chelsea- pertama kali datang ke Inggris untuk melatih klub Chelsea. Ketika diwawancarai media dia berkata kurang lebihnya “I am the Special One“. Beberapa tahun kemudian saat dia memutuskan untuk mengundurkan diri dari Chelsea salah satu media olahraga menulis tentang pengunduran dirinya dengan judul headlineOne Special Gone“. Kalau saja Jose Mourinho berkata “I am not the special one” dan bukannya “I am the special one” mungkin koran dengan headline “One Special Gone” tidak akan pernah ada.

Ketika salah satu keponakanku yang masih kecil bertanya, kalau tidak salah begini “Om udah punya pacar?”. Pertanyaan sederhana tapi bagiku agak berat menjawabnya akhirnya kujawab saja “Belum”. mendengar jawabanku yang seperti itu dia langsung menyambung lagi “Sama dong, aku juga lagi nyari”. Wah anak ini, masih kecil kok udah mikir pacaran segala. Begini nih pengaruh negatif dari pergaulan dan mungkin juga TV pada era informasi ini.

Aku kadang juga ditanya sama kakak iparku (karena aku sekarang tinggal serumah dengan kakak) “Kamu memang belum punya calon istri ya?”. Jawabannya lebih enak kalau aku diam saja (tentunya kalau diam itu juga dikategorikan sebagai jawaban lho), tapi kalau terus – terusan ditanya gimana ya? Kalau ibuku sampai mengajukan pertanyaan yang kira – kira sama gimana ya?

Read the rest of this entry »

Posted in General, Six Sense | Tagged: , , , , | 3 Comments »

Olimpic Games 2008: First Gold Medal for Indonesia

Posted by triaslama on August 16, 2008

I would like to say congratulations for Indonesia Badminton double men’s pair, Markis Kido and Hendra Setiawan for their achievement in Beijing 2008 Olimpic Games. Because of them our nation get the first gold medal in Beijing 2008 Olimpic Games.

Markis Kido & Hendra Setiawan

Markis Kido & Hendra Setiawan

In final match, Markis Kido/Hendra Setiawan beats China double men’s pair Cai Yun/Fu Haifeng in three sets 12-21, 21-11, 21-16. Lose in first set Kido/Setiawan revived in the next two sets and won the final match against Cai/Fu.

This victory is special, because a day later -August 17, 2008- is the independence day of Indonesia. So I think Kido and Setiawan has gift our nation special reward (first gold medal for Indonesia team in Olimpic 2008). Although now I am rarely play badminton (or maybe just ‘never play Badminton again’) but I am still Badminton fans, especially for Indonesia team.

I hope this is not the only one gold medal for Indonesia in this Olimpic Games. Once again, congratulations for Kido/Setiawan and keep fighting guys!

Posted in General, News | Tagged: , , , , , , , , | 5 Comments »