Posts

How to use Join with LINQ

using System; using System.Linq; using System.Configuration; public partial class LINQWithJoin : System.Web.UI. Page {     TestDataClassesDataContext objDBContext = new TestDataClassesDataContext ( ConfigurationManager .ConnectionStrings[ "TestConnectionString" ].ToString());     protected void Page_Load( object sender, EventArgs e)     {     }     protected void btnDisplay_Click( object sender, EventArgs e)     {         var Allcity = from city in objDBContext.City_Tbls join state in objDBContext.State_Tbls on city.State_Id equals state.State_Id                              select new                             {                                CityName=city.Name,                                StateName=state.Name                             };         GridView1.DataSource = Allcity;         GridView1.DataBind();         } } int above code CityName & StateName works as a alias from city.Name

How to use SQL Query with LINQ

Add LINQ to SQL Class from Add New Item Template and name it TestDataClassesDataContext Add Database table in to TestDataClassesDataContext Create a   TestDataClassesDataContext object into default.aspx.cs   page   TestDataClassesDataContext objDBContext = new TestDataClassesDataContext ( ConfigurationManager .ConnectionStrings[ "TestConnectionString" ].ToString());   //Bind Gridview using LINQ with Query // User_Tbls is User_Table(DataBase table) class var userdetails = from user in objDBContext.User_Tbls select user;         GridView1.DataSource = userdetails;         GridView1.DataBind();

Open only 1 highslide pupup window if use highslide in a gallery (automatically close the already open window)

1.        Open Highslide-full.js or highslide-with-html.js which is used in your project. Add the below hightailed code in  Highslide-full.js or highslide-with-html.js hs.Outline =  function (outlineType, onLoad) {    this .onLoad = onLoad;    this .outlineType = outlineType;    var v = hs.uaVersion, tr;       this .hasAlphaImageLoader = hs.ie && hs.uaVersion < 7;    if (!outlineType) {           if (onLoad) onLoad();           return ;    }    hs.init();   this .table = hs.createElement(           'table' , {                  cellSpacing: 0           }, {                  visibility: 'hidden' ,                  position: 'absolute' ,                  borderCollapse: 'collapse' ,                  width: 0           },           hs.container,           true               );      /****** add this code to generate the Table Unique ID****************/     var key = this .key = hs.expa

What is Sharepoint?

What is Sharepoint? SharePoint is a multi-purpose tool designed to cater to web requirements common for most organizations . Sharepoint is developed by Microsoft which is used to companies manage their data which is in the form of documents, emails, contacts, etc. documents, emails, contacts, etc. Sharepoint Versions 1. SharePoint 2010 (Windows Server 2008 64 bit) 2. Windows SharePoint services 3.0 + MOSS 2007 (Windows Server 2003) 3. Windows SharePoint Services 2.0 4. SharePoint Team Services Sharepoint 2007 is depend on internet explorer but sharepoint 2010 allow all popular explorer such as IE, Firefox Safari etc.