Category Archives: C#

configurationmanager does not exist in the current context

To read connection string from web.config we need to use configurationmanager class and its method which root class is System.Configuration; If you want to use you need to add namespace using System.Configuration; Though you used this namespace, when you will … Continue reading

Posted in ASP.NET, C#, Languages | Tagged , , | 783 Comments

Mono 2.8 is released which covers C# 4.0

Ref:Mono, an open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET. Using this one can developed .net based application in unix and linux. Mono 2.8 is a portable and open source implementation of the … Continue reading

Posted in .Net, Application Development, ASP.NET, asp.net 4.0, C#, Operating System, Web Development | Tagged , , | 523 Comments

Access Properties of a UserControl from other UserControl in ASP.Net Page

Few days ago I have posted an article “How To Access One UserControl from Another UserControl Using ASP.NET“. When I try to find out solution for this I have got some nice articles about this issue. Rami vermula shows how … Continue reading

Posted in .Net, Application Development, ASP.NET, C#, Web Development | Tagged , | 584 Comments

How to compile C# Application for both 32 bit and 64 bit system?

I have faced this problem when one of my client try to run SMS Suit software in Windows 7 64 bit. Previously it is working perfectly in vista and windows xp 32 bit . After searching online I have found … Continue reading

Posted in 32 bit, 64 bit, C#, Windows 7 | 471 Comments

Looping Through Controls in ASP.NET

In my recent development I have badly needed to read all the controls from asp.net page. After searching I have found lots of solution. Now I want share with you one of these solution. In this solution we read all … Continue reading

Posted in ASP.NET, C#, master page, VB.Net | 713 Comments

MS Sql server: How to do multiple rows insert ?

Recently I have faced a problem when insert multiple row insert at single call. After first row insert then problem arise from  second row insert. After goggling I have found a solution : it need to clear parameter after each … Continue reading

Posted in C#, MS SQL | 846 Comments

String Formatting in C#

Numbers Basic number formatting specifiers: Specifier Type Format Output (Passed Double 1.42) Output (Passed Int -12400) c Currency {0:c} $1.42 -$12,400 d Decimal (Whole number) {0:d} System.FormatException -12400 e Scientific {0:e} 1.420000e+000 -1.240000e+004 f Fixed point {0:f} 1.42 -12400.00 g … Continue reading

Posted in C#, General Programming | 736 Comments

How to get File size in ASP.NET/C#

In asp.net forum I have got this question many times like this, “How to get File size” or “How to get File Length”. For this today I want to share with you how to get the file size in asp.net. … Continue reading

Posted in ASP.NET, C# | 476 Comments

Windows 7 : C# Error:’Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine

ProblemToday I have faced this error when try to use MS Access database from SMS software. After goggling I have found the solution in …MSDN forum Solution The behavior you described is expected. If your application runs in 64-bit mode, … Continue reading

Posted in C#, Windows 7 | 601 Comments

Accessing Master page functions from a content page

Accessing Master page functions from content page we must include a MasterType directive at the top of the Content page ASPX file: In DetailsMaster.master.cs page public void SavePageData() { // function definition } After place the MasterType directive is in … Continue reading

Posted in ASP.NET, C#, master page | 491 Comments