Posts

Showing posts from November, 2011

Asp.Net ShortCut Keys

Image
.NET ShortCut Keys   Ctrl + N Opens the New Project Dialogue Box Ctrl + Shift + O Opens the Open File Dialog Box Ctrl + Shift + A Opens Add New Item window Ctrl + D Opens Add Existing Item window Ctrl + S Saves Current Form Ctrl + Shift + S Saves everything from Application Alt + Q Exits Visual Studio. NET Ctrl + Z Undo Ctrl + Shift + Z Redo Ctrl + X Cuts your selection Ctrl + C Copies your selection Ctrl + V Pastes your selection Ctrl + A Selects All Del Deletes your selection Ctrl + F Opens Find window Ctrl + H Opens Find and Replace window Ctrl + Shift + H Opens Replace in Files window Ctrl + Alt + Shift + F12 Opens Find Symbol window F7 Opens Code Designer window Shift + F7 Gets you back to Design View Ctrl + R Opens the Solution Explorer window Ctrl + Alt + S Opens the Server Explorer window Ctrl + Shift + C Opens the Class View window F4 Opens the Properties window Ctrl + Shift + E Opens the Resource view window Ctrl + Alt + X Opens the Toolbar window Shift + Alt + Enter Ta...

If you want to implement fulltext on view you might readt it....

CREATE VIEW [dbo].[FetchStockInformation] WITH SCHEMABINDING AS SELECT     B.BrandName, I.ItemName, C.ItemCatName, S.SubCatName, I.ReOrderLevel, SUM(M.Qty) - SUM(PD.Qty) AS Qty FROM         dbo.tblmrnchild AS M INNER JOIN                       dbo.tblBrandMaster AS B ON B.BrandID = M.BrandId INNER JOIN                       dbo.tblItemMaster AS I ON M.ItemId = I.ItemID INNER JOIN                       dbo.tblCategoryMaster AS C ON M.CategoryId = C.ItemCatID LEFT OUTER JOIN                       dbo.tblSubCategory AS S ON S.SubCatID = M.SubCategoryId LEFT OUTER JOIN                       dbo.tblPurchaseDetailsByUser AS PD ON PD.ItemID = M.ItemId LEFT OUTER JOIN     ...

Validation in Asp.net Windows Application

static void  Main ()           {              Application.Run( new  SimpleValidation());          }          private void  txtName_Validating(object sender, System.ComponentModel.CancelEventArgs e)          {              if  (((TextBox)sender).Text ==  "" )              {                  MessageBox.Show( "You must enter a first and last name." ,  "Invalid Input" , MessageBoxButtons.OK, MessageBoxIcon.Warning);       ...

If you want union of two data table in asp.net then follow this.....

        public DataTable Union(DataTable First, DataTable Second)         {             //Result table             DataTable table = new DataTable("Union");             //Build new columns             DataColumn[] newcolumns = new DataColumn[First.Columns.Count];             for (int i = 0; i < First.Columns.Count; i++)             {                 newcolumns[i] = new DataColumn(                 First.Columns[i].ColumnName, First.C...

SQL SERVER – Find Stored Procedure Related to Table in Database

----Option 1 SELECT DISTINCT so.name FROM syscomments sc INNER JOIN sysobjects so ON sc.id = so.id WHERE sc. TEXT LIKE '%tablename%' ----Option 2 SELECT DISTINCT o.name , o.xtype FROM syscomments c INNER JOIN sysobjects o ON c.id = o.id WHERE c. TEXT LIKE '%tablename%'

If you want to pass table in form of XMLin asp.net

1st build xml data and pass it.... dt.TableName = "MyData"; using (StringWriter sw = new StringWriter())             {                 dt.WriteXml(sw);                 result = sw.ToString().Replace("NewDataSet", "DocumentElement");             } 2nd in proc you can get by select ...  SELECT  cast(colx.query('data(Column1) ') as nvarchar(max)) as Column1,         cast(colx.query('data(Column2) ' )as nvarchar(max)) as Column2,         cast(colx.query('data(Column3) ' )as nvarchar(max)) as Column3        into #Temp from @MyData1.nodes('DocumentElement/MyData') as Tabx(colx)