I find It very annoying when adding row number to a query result, espesially when you're working with different RDMS like Oracle or SQL Server. They have their own syntax for row numbering. But when you use that in a GridView or DataGrid, it will be a piece of cake. You can try using this technique in just like example :
<Columns>
<asp:TemplateColumn HeaderText="No.">
<ItemTemplate>
<asp:Label runat="server" ID="LabelNumber"
Text="<%# Grid1.PageSize*Grid1.currentPageindex + Container.ItemIndex+1%>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
Add a new column for your Row number. And you will find Grid1 is the ID of your GridView or DataGrid.
Here's give it a try :)
Diary of a Programmer
Thursday, November 29, 2012
Thursday, May 10, 2012
Bug Fixing & Trouble Shooting : Retrieving the COM class factory for component with CLSID Error
Hi guys... It's been a really long time since my last post. Today I'll write my bug fixing and trouble shooting experience : Retrieving the COM class factory for
component with CLSID {2F422F62-D11B-11D0-8384-00A0C92018F4} failed due to the
following error: 80040154.
This error usually occur when we develop in different type of CPU processor and OS. I've developed a web based application in windows server 2003 32-bit and then I moved them into a Windows server 2008 64-bit. And when I was running the application that execute a method from a 32-bit dll, it always shows that error message. After several hours working and searching in google, I found that there is special setting in IIS that allows application pool to execute 32-Bit applications.
So the solution steps are :
And It worked well for my problem... :)
and if you find my post is useful, please share a comment. :)
See you next time.
This error usually occur when we develop in different type of CPU processor and OS. I've developed a web based application in windows server 2003 32-bit and then I moved them into a Windows server 2008 64-bit. And when I was running the application that execute a method from a 32-bit dll, it always shows that error message. After several hours working and searching in google, I found that there is special setting in IIS that allows application pool to execute 32-Bit applications.
So the solution steps are :
- Press ctrl + run. (to open Run)
- Type inetmgr then press enter ( to Open IIS)
- Expand the server name tree and you'll find Applications Pool.
- In the right side of the view, choose the application pool that your application using.
- And in the most right panel there is an Advanced Settings under the Edit Application Pool group.
- There'll appear an Advanced Settings dialog, and change the Enable 32-Bit Application value into True.
And It worked well for my problem... :)
and if you find my post is useful, please share a comment. :)
See you next time.
Labels:
.NET,
bug fixing,
error,
IIS,
trouble shooting,
windows server
Sunday, March 20, 2011
Announcement : After a long break
It's been a long time since my last post about 2 months ago. I had a very busy time because I had to prepare myself to move to a new city, to larger city than I was. I had no time to online for writing any post in the past two months.
From this time, I will regularly keep updating my blog and posting simple tips but useful in programming realm.
Sorry for the inconvenient... See you in the next post...
From this time, I will regularly keep updating my blog and posting simple tips but useful in programming realm.
Sorry for the inconvenient... See you in the next post...
Tuesday, January 4, 2011
Javascript Tips : How to create a pop up window using javacript in a Button?
How to create a pop up window when someone click on a button?
Here's a simple code the way I made it..
============================ ==================================
============================== ==================================
we create a javascript function that we called "popup()". The statement window.open(), accept url parameter.
and then to call the function we utilized the button's onclick event.
That's is my simple way to create a pop up function... if you find this post help you, please leave a comment bellow.
Thank you...
Here's a simple code the way I made it..
============================ ==================================
<html>
<head>
<title>How to create pop up window using java script in a Button</title>
<script language="javascript" type="text/javascript">
function popup()
{
// change with your target URL
popwindow = window.open("http://diary-of-programmer.blogspot.com/");
return false;
}
</script>
</head>
<body>
<input type="submit" value="pop up" onclick="return popup()"/>
</body>
</html>
<head>
<title>How to create pop up window using java script in a Button</title>
<script language="javascript" type="text/javascript">
function popup()
{
// change with your target URL
popwindow = window.open("http://diary-of-programmer.blogspot.com/");
return false;
}
</script>
</head>
<body>
<input type="submit" value="pop up" onclick="return popup()"/>
</body>
</html>
============================== ==================================
we create a javascript function that we called "popup()". The statement window.open(), accept url parameter.
and then to call the function we utilized the button's onclick event.
That's is my simple way to create a pop up function... if you find this post help you, please leave a comment bellow.
Thank you...
Wednesday, December 22, 2010
Basic Question : What is HTML?
If we talk about web, we could not forget about HTML. So, what is HTML?
HTML stands for Hyper Text Markup Language. It's the main markup language for the web pages.
HTML elements are consist of tags (a word surrounded by angle brackets < and >). The tags in HTML usually come in a pair (start/opening tag and end/closing tag) eg.: <html></html>, <b></b>, etc. HTML element also have properties that usually we called with attributes. For list of elements and elements attributes you can find it here or here.
Here's some of example of simple HTML document:
------------------------------------------------------
HTML stands for Hyper Text Markup Language. It's the main markup language for the web pages.
HTML elements are consist of tags (a word surrounded by angle brackets < and >). The tags in HTML usually come in a pair (start/opening tag and end/closing tag) eg.: <html></html>, <b></b>, etc. HTML element also have properties that usually we called with attributes. For list of elements and elements attributes you can find it here or here.
Here's some of example of simple HTML document:
------------------------------------------------------
<!doctype html> <html> <head> <title>Hello HTML</title> </head> <body> <p>Hello World!</p> </body> </html> ---------------------------------------
I think that' is for today, I hope you'll find it helpful.
Please leave a comment below
Thank you..
Monday, December 20, 2010
Other links to access this blog
you can access my blog for shorter using the link below:
http://adf.ly/DcJO
and if you want to shorter your website URL use this link:
http://adf.ly/?id=186197
http://adf.ly/DcJO
and if you want to shorter your website URL use this link:
http://adf.ly/?id=186197
Basic Question : What is .NET framework?
Once upon a time, someone asked me, a simple question but it will be as hard as a calculus problem if we don't know what to say :). What is .NET framework? simple but deadly, huh. I turned my brain on to think about the best answer for that simple question. But, I didn't think my answer quite made him satisfied. What a shame for me, I have been using the.NET framework & C# language for 8 months and I didn't fully understand what .NET framework is.
Here's some of what I quoted from wikipedia for .NET framework definition:
"The Microsoft .NET Framework is a software framework for Microsoft Windows operating systems. It includes a large library, and it supports several programming languages which allows language interoperability (each language can utilize code written in other languages.) The .NET library is available to all the programming languages that .NET supports."
So, The .NET framework is created by Microsoft, and it'll help programmer to develop application rapidly because it provide a huge library (collection of usable code) and it support for any developer that have different skill of programming language (such as: VB.NET, C#, J#, etc) so that they can still use their skill for develop an application without worries about language boundary, because .NET framework will allow them to utilize code written in other languages (language interoperability). And that .NET library is available to all programming language.
Further more from wikipedia :
"The framework's Base Class Library provides user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The class library is used by programmers, who combine it with their own code to produce applications.
Programs written for the .NET Framework execute in a software (as contrasted to hardware) environment, known as the Common Language Runtime (CLR). The CLR is an application virtual machine so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework."
Oh.. that's the base class of that huge .NET library offers for the developers. that CLR sure have a great important role in this .NET framework. It acts as a virtual machine that the written programs are executed in.
I think that's enough for the simple definition of .NET framework, but if you still curious about .NET framework, please search in google or wikipedia for the reference.
thank you for today...
if you find this post help you, please leave a comment below....
Subscribe to:
Posts (Atom)