Monday, April 26, 2010
Delete asp.net Listbox item...(Multiple Items) !!
for Multiple selection, enable the Multiple option of the List box to "Multiple"..
for (int i = 0; i < ListBox1.Items.Count; i++)
{
int myindx = ListBox1.SelectedIndex;
if (myindx >= 0)
{
if (ListBox1.Items[myindx].Selected == true)
{
ListBox1.Items.RemoveAt(myindx);
}
}
}
Asp.net List box to ListBox Transfer....
The ListBox control enables you to display a list of items to the user that the user can select by clicking. A ListBox control can provide single or multiple selections using the SelectionMode property. This tutorial show you how to choose multi items and move them to the other Listbox.
The ListBox control enables you to display a list of items to the user that the user can select by clicking. A ListBox control can provide single or multiple selections using the SelectionMode property. The ListBox also provides the MultiColumn property to enable the display of items in columns instead of a straight vertical list of items. This allows the control to display more visible items and prevents the need for the user to scroll to an item. This tutorial show you how to move items of ListBox from one to the other.
Thursday, April 22, 2010
POP3 (Post Office Protocol) in Asp.net to recieve email
Socket programming enable us in doing this ... lets see that in simple
Sunday, April 18, 2010
Developing on MONO !! its Great!!!!!!!!!!
Think about the situation in which we are able to run c# code on Mac and Linux Machines..
Its real now.. We can convert our software developed in C# to run on Linux and Mac Machines..
Me started it too.. and the MONO can help us in doing that.. :)
Mono and .NET compile source code into 'assemblies'. Assemblies, which are similar to collections of Java .class files, contain language-independent, platform-independent bytecode called CIL (Common Intermediate Language). Because assemblies are language independent, it doesn't matter what language was used to create them. Assemblies made with C# can mix with assemblies created with VB.NET, Java (using IKVM), or any language that someone has written a CIL compiler for.
But, being platform independent means, of course, that assemblies need to be compiled again into native code before they can run on any particular machine. It's important to distinguish the two compilations involved in Mono applications: from source code to byte code, and from byte code to native machine code. The first compilation is performed by the developer. The second compilation is generally performed just when the program begins executing, on the very computer that will run the application, and for this reason it's called Just-In-Time (JIT) compilation. This second compilation and the execution of the application is performed by a Common Language Runtime (CLR).
Mono also supports Ahead-Of-Time (AOT) compilation. This is a mode that pre-compiled the code, and it is useful to reduce application startup time (by eliminating the JIT startup time) and increasing the code that can be shared across multiple applications.
On Windows and Linux, as well as other operating systems, assemblies are stored in files with the .dll or .exe extension. The only difference between a .dll assembly and a .exe assembly is that a .exe assembly contains a starting point for an application (a Main method), whereas .dll assemblies only are class librariesTuesday, January 5, 2010
Admin is not Admin in WIndows Vista !!

The directory access and Write permision using code in Vista is in blocked state. so Project working in Xp will do HELL in vista throwing access exceptions.....
to over come this add manifest file from project add new item and precombile it thus Avoid that Vista Hell....
So that we are able to pull the Vista UAC .............
Monday, January 4, 2010
create fullcontrol to a directory for windows machines
System.Security.Principal.NTAccount acct = sid.Translate(typeof(System.Security.Principal.NTAccount)) as System.Security.Principal.NTAccount;
string strEveryoneAccount = acct.ToString();
DirectoryInfo dInfo = new DirectoryInfo(Environment.CurrentDirectory + "\\serverservice");
DirectorySecurity dSecurity = dInfo.GetAccessControl();
dSecurity.AddAccessRule(new FileSystemAccessRule(strEveryoneAccount, FileSystemRights.FullControl, AccessControlType.Allow));
dInfo.SetAccessControl(dSecurity);
Sunday, December 13, 2009
AVOID ASP.net SESSION ERROR..(null reference and others...!)
public static class SessionHandler
{
private static string _userCountryKey = "UserCountry";
public static string UserCountry
{
get
{
/
if (HttpContext.Current.Session[SessionHandler._userCountryKey] == null)
{
return string.Empty;
}
else
{
return HttpContext.Current.Session[SessionHandler._userCountryKey].ToString();
}
}
set
{
HttpContext.Current.Session[SessionHandler._userCountryKey] = value;
}
}
}
here we can set and retrive it ....
SessionHandler.UserCountry="INDIA"
retrive using
Response.Write(SessionHandler.UserCountry);
Avoid all null references that are eating us ......