Cannot see Master Pages in SharePoint Designer 2013 In root site

SharePoint-2013

If you just want to edit the master page without fixing the missing items in the sidebar, you can navigate to _catalogs/masterpage through the “All Files” section in SharePoint Designer.

On the other hand, if you want to fix it, here’s how I managed to do it:

We were facing the same problem in one of our SharePoint 2013 installations. I searched for that and I only found answers saying that I’d need to activate the publishing feature in the site collection scope, however that was not the problem since it was already activated.

Later I found out that the “Lists and Libraries” section in the Site Objects would not show any results. The problem is that we had a list in the site that was using a list template from an old solution that was not installed anymore, causing ListData.svc — a web service used by SharePoint Designer — to crash. You can see more here: Why don’t Lists and Libraries show up in SharePoint Designer?

After I deleted that list though the SharePoint Management Shell, not only the lists started to show up in the Lists and Libraries section, as also the Master Pages and Page Layouts sections reappeared.

Ref : Sharepoint StackExchange

Advertisements

How to execute a stored procedure within C# program – with Parameter, using Loop

csharp

Here is a sample :

using (SqlConnection conn = new SqlConnection(ConnectionString) {
    conn.Open();

    // 1.  create a command object identifying the stored procedure
    SqlCommand cmd  = new SqlCommand("CustOrder", conn);

    // 2. set the command object so it knows to execute a stored procedure
    cmd.CommandType = CommandType.StoredProcedure;

    // 3. add parameter to command, which will be passed to the stored procedure
    cmd.Parameters.Add(new SqlParameter("@CusID", custId));

    // execute the command
    using (SqlDataReader rdr = cmd.ExecuteReader()) {
        // iterate through results, printing each to console
        while (rdr.Read())
        {
            Console.WriteLine("Product: {0,-35} Total: {1,2}",rdr["ProductName"],rdr["Total"]);
        }
    }
}