Skip to main content

Posts

Showing posts from October, 2008

To display the message box in asp.net

Use the namespace using System.Runtime.InteropServices; Then use DllImport " DllImportAttribute Class Indicates that the attributed method is exposed by an unmanaged dynamic-link library (DLL) as a static entry point." Use the lines below [ DllImport ( "user32.dll" , CharSet = CharSet .Unicode)] public static extern int MessageBox( IntPtr hWnd, String Text, String Caption, uint type); InPtr This type implements the ISerializable interface. And then put this code MessageBox( new IntPtr (0), "Hello World" , "Hello Dialog name" , 0); Note: The DllImportAttribute does not support marshaling of generic types.

To get the row number in SQL2000.

SELECT *, (SELECT COUNT(*) FROM Mas_Company e2 WHERE e2.Company_Code <= e.Company_Code) AS 'rownumber' , Mas_Company.*, Company_Code AS Expr1, Company_Name AS Expr2, Company_SName AS Expr3, Company_Add1 AS Expr4, Company_Add2 AS Expr5, Company_City AS Expr6, Company_Pincode AS Expr7, Company_ph_no AS Expr8, Company_Active_Flag AS Expr9 FROM Mas_Company e