Category: Programming

Session vs Viewstate in ASP.NET

What is the difference between SessionState and ViewState in ASP.NET?

If you asked this question to me, the main difference is a session known in a every page in all application and viewstate just only in a page. To know more about Understanding ASP.NET View State just read here . In stackoverflow, some people give their answer like this:

Session State contains information that is pertaining to a specific session (by a particular client/browser/machine) with the server. It’s a way to track what the user is doing on the site.. across multiple pages…amid the statelessness of the Web. e.g. the contents of a particular user’s shopping cart is session data. Cookies can be used for session state.
View State on the other hand is information specific to particular web page. It is stored in a hidden field so that it isn’t visible to the …

Apa itu pseudocode?

Entah kenapa saya harus menuliskan ulang lagi dan memplejari hal mendasar ini karena pada beberapa saat lalu saya disuguhkan sebuah soal dengan membuat suatu pseudocode dari permasalahan yang ada. Jujur saya rada kewalahan menjawabnya karena lupa dan memang hampir tidak pernah menyentuh yang namanya pseudocode. Dulunya langsung sikat habis saja dengan membuat kode programnya dengan membabi buta, kompile, dan eksekusi, ibaratnya try and error. Memang rada sadis sih dan terlalu naif jika ditanyakan hal-hal seperti ini, pseudocode biasanya diajarkan pada awal belajar bahasa pemrograman yaitu di pelajaran algoritma dan pemrograman. Sepertinya saya salah dasar dulunya, terlalu banyak mengabaikan teori.

Sebagai pengingat kembali mengenai pseudocode, saya coba membaca beberapa referensi di Internet dan ini sangat bagus menurut saya, siapa tahu ini bermanfaat juga bagi siapa saja yang kebetulan lewat dan membaca tulisan ini. Tulisan ini saya coba tulis kembali disini sebagai referensi pribadi …

Link to remember for saving your time

How to create multiple row header and merge it with other columns in GridView

LinkButton inside Repeater inside UpdatePanel

Gridview Scrool

No connection could be made because the target machine actively refused it

Problem is:

Server Error in ‘/’ Application.

No connection could be made because the target machine actively refused it

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it

Stack Trace:

[SocketException (0x274d): No connection could be made because the target machine actively refused it]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +251
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +279

[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) +6100429
System.Net.HttpWebRequest.GetRequestStream() +13
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +110
WebServices in xxx\Reference.cs:331
UserControls_xxx.gv_RowDataBound(Object sender, GridViewRowEventArgs e) in xxx.ascx.cs:835

Undo user checkout in tfs

Many ways have been done by me, but nothing for the result. Just only because of a user forgets to check in his working in TFS server, everything getting wrong every updates the file. That user must check in it, but he has been resigned. Try to use his account by asking his password from Visual Studio connects TFS, again failed, also has been used Administrator account.

Must be there is a way to solve this. After searching some thing with key word “tfs undo” in google, finally find the article from msdn which can help me to solve the problem. It is using command prompt utility of Visual Studio. It is a cool command and problem solved.

Click Start, click All Programs, click Microsoft Visual Studio 2008, click Visual Studio Tools, and then click Visual Studio Command Prompt.
Type the following command and replace the arguments with …