.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Calendar not displaying correctly

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :C#


  When I created a new site collection the alendar is showing up without formatting.  The days of the week are abbreviated as well.  I wonder if an incorrect template is installed.


View Complete Post

More Related Resource Links

Displaying Calendar Description Field In Calendar View

In the default "out of the box" calendar view it only shows the Title of a calendar event. Is there any way to show not only the Title field but also the Description field?

Problem displaying Date from Sql table on Calendar Control

Hi, I am displaying Event dates from SQL table on Calendar Control in ASP.NET. Also, I have GridView Control which shows event details when certain date is clicked on calendar control. But I have a problem as not all dates are displaying properly. Strangly enough only dates which have same month and day date are displayed. For example: It shows ok dates such as 08/08/2010, 09/09/2010, 10/10/2010 etc. If I click on the date which in SQL table exists as 11/25/2010 or 12/15/2010 etc (no matching month/day numbers) it shows error message saying: "System.Data.SqlClient.SqlException: Conversion failed when converting date and/or time from character string."  Follwoing is my code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.Sql; using System.Runtime.Remoting.Messaging; using System.Configuration; using System.Data.SqlClient; using System.Data; using System.Drawing; public partial class Test_Calendar : System.Web.UI.Page { SqlConnection mycn; SqlDataAdapter myda; DataSet ds = new DataSet(); DataSet dsSelDate; String strConn; private void Page_Load(object sender, System.EventArgs e) { strConn = "Data Source=mydatasource;Initial Catalog=DBname;Persist Security I

Value not displaying correctly

I'm really at a loss here.  High level description is this:  I have a value that is pulled from a session variable.  In the PageLoad method, the value is stored in a local variable.  A literal control is set on the page with that local variable and then the value is stored in the database.  There is no default value for the literal control on the aspx page.  For some reason, the literal is displaying an incorrect value, but the value placed in the database (using the same local variable) is correct.  If I hit F5 to reload the page, the correct value shows up.  I have no idea where the incorrect value is coming from.  It is a possible value, but not the correct one.  This problem only appears on the production server.  The pages work perfectly on my local machine.  Any help would be GREATLY apprecated since I'm about to go crazy trying to figure this out.  Here's some code to better explain things...This starts out on a page that has 3 choices.  If the user selects the correct value, it goes to the next page.  This works fine.  If an incorrect answer is selected, that choice will disappear, and the user will select again.  Once the correct choice is selected, the test goes to the page that has the problem.  Here's the first page:<html xmlns="http://www.w3.org/1999/xh

What service is responsible for Calendar Overlay working correctly?

I'm having 2 issues with my SharePoint server.  User Profile Sync stuck on starting and Calendar Overlay not working. I created a calendar overlay a month ago, containing 7 other calendars and it works fine.  It currently still works if I add items to one of the 7 calendars, those items show up on the calendar with the overaly. But if I try and create a new calendar and add overlay to it - containing different calendars, nothing appears.   No calendar items from the overlay calendars that I've added. This has only started happening since my User Profile Sync stopped working - are the two related, somehow? I get no errors at all - just a blank calendar!  Frustrating!! Thanks for any help.  

Displaying multiple calendar months in SP 2007

I need to display multiple months using the calendar in SP. For example, my user wants to select a month ( we'll say May ) and have May, June and July displayed. Is this possible?

Problem displaying a view correctly in MVC app using HTML.TextBoxFor() with VB



I have a test app with a form view.

I cannot get the view to display correctly instead of displaying a series to text boxes it displays quoted html.

I suspect that my problem is related to my VB syntax for my Linq

The C# equivilant works but my shop uses VB so I must convert the code.

Here is the code from the view:

      <% Using (Html.BeginForm)%>
          <p>Your name: <%: Html.TextBoxFor(Function(m) m.Name).ToString%></p>
          <p>Your email: <%: Html.TextBoxFor(Function(m) m.Email).ToString%></p>
          <p>Your phone: <%: Html.TextBoxFor(Function(m) m.Phone).ToString%></p>
          <p>Will you attend? <br />
          <%  Dim slist As New Generic.List(Of SelectListItem)
          slist.Add(New SelectListItem With {.Text = "Yes", .Value = Boolean.TrueString})
          slist.Add(New SelectListItem With {.Text = "No", .Value = Boolean.FalseString})
       <%: Html.DropDownListFor(Function(m) m.WillAttend, slist, "Choose an option")%>
       <input type="submit" value="Submit RSVP" />
       <% End Using%>

Custom Task form of a SharePoint Designer workflow is not displaying correctly


We have created a custom workflow using SharePoint Designer. We are using one action “Collect Data from a User”. As you know, this action sends an email to a user with a link to a task form where user is supposed to accept or reject a request. We are encountering following issues with this form:

  1. Form is not a workflow form, it is a task item of the task list that the “Collect Data from a User” action of the workflow creates.
  2. Form opens as an item of the workflow task list in View mode (DispForm.ASPX) instead of Edit mode (EditForm. ASPX)
  3. When user clicks on “Edit Item” button, it displays all the fields of the task as editable – we want only the Approve/Reject option buttons and the comments TextBox (that we created during the workflow design) to be displayed as editable

Can someone please explain what is going on and how can we resolve the above issues?

Site not displaying Correctly


Having problems with our lab env.

Use to be able to go to the root, which has a site collection there...such as


would automatically redirect to 


That no longer works it will display the page if you type the address including the .aspx page....

And the second issue is when we go to the root site in the web application


The page is being displayed like it's missing the style sheets...and the ribbon does not show either....

Not sure what happened to this farm it's a 2010 farm.....

Wondering if anyone had any ideas or has seen this before....


Thanks for the Help,


Small problem with displaying custom calendar cell text from db in Safari


using VS2010

I'm using the calendar control to create a simple event calendar. I want to add a small bit of custom text just below the date of any cell that contains an event on that date.

The code:

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
      string connString = ConfigurationManager.ConnectionStrings["CalendarConnectionString1"].ToString();
      SqlConnection myConnection = new SqlConnection(connString);
      SqlDataAdapter myAdapter = new SqlDataAdapter("GetEvents", myConnection);
      DataSet myDataSet = new DataSet();
      myAdapter.Fill(myDataSet, "Table");
      //If the month is CurrentMonth
      if (!e.Day.IsOtherMonth)
        foreach (DataRow dr in myDataSet.Tables[0].Rows)
          if ((dr["Date"].ToString() != DBNull.Value.ToString()))
            DateTime dtEvent = (DateTime)dr["Date"];
            if (dtEvent.Equals(e.Day.Date))
              e.Cell.BackColor = Color.MediumAquamarine;
              Label label = new Label();
              label.Text = "</br>";
              label.Text += dr["Title"].ToString();              

Picture Library not displaying correctly after upgrade from WSS 3.0


We recently upgraded to Sharepoint 2010 from WSS 3.0.  I used at database attach upgrade method and all went smoothly considering I'm quite inexperienced.

We don't have any custom coding in our site so the visual upgrade tool worked well.  Unfortunately, Since the upgrade I've noticed that IE8 doesn't display picture previews/thumbnails in picture libraries - instead I get a red X.  I'm not sure if it's all picture libraries or just those with spaces in the path to the picture library - they are all named "Client Photographs" so all of them have a space in their path.  Many of these picture libraries have subfolders within them.

The problem is with the view for the library, not the library itself as the pictures are there and can be opened if I open the library in Windows Explorer.  If I create a new view for the library, the new view works correctly.  If I try to modify the view for the library and then return to the library, I can no longer navigate to subfolders the display only shows the root folder of the picture library. 

I will probably run a script to create new views for each picture library in our site collection but am interested to know if anyone else has experienced this, if there are any other solutions, and what I missed in our upgrade process that caused this.

Ajax comboBox not displaying correctly after panel made visible




I have a WSP project in which i have added ajaxcontroltoolkit to SharePoint 2010 succesfully and the controls work when in basic web parts.


However i have a web part which has several panels to show / hide various sections as required, within one of the panels i have a combobox.

The panels are set a visible = false to begin with and then toggled to be displayed. 

When the panel is set visible = true i get an Javascript error of: 

Message: 'AjaxControlToolkit' is undefined


The combobox does not display correctly and won;t function.


If the panel is set as visible to begin with - it works fine, but thats not a solution to something which should work.


I have tried various workarounds - but nothing is working.

  • changed scriptmanager on master page to ToolkitScriptManager 
  • add javascript to resize the combobox when its made visible

Is there away to get this working?




Sharepoint 3.0 Contact List not displaying correctly.



I recently moved the MDF and log file to another drive as the server's C:\ drive was full. Upon successfully reattaching the database I have been told that peoples first names are missing from the Contact list in sharepoint.


URL is: http://server01:3000/Lists/Contacts/AllItems.aspx

I am not 100% this has to do with the move of the 2 files STSServer01_1.mdf and STSServer01_1_log.ldf, however this is what they are saying that the First names have now gone.

When clicking on Lists and > Contacts I can see that the people in the list are missing the first name.

The format used to be: Lastname, Firstname

Now I can see just: Lastname

Any ideas why this would happen and how I get it to display first/last names again? The column is called 'Contact Name'.

Also how do I find out if this list is being read from somewhere such as someones outlook or the GAL or if they just created this list (I think they just created it)

Thanks for the assistance.


Popup with ScrollViewer and VerticalScrollBarVisibility=Auto not displaying correctly in 3.5sp1


If I have a Popup which contains a ScrollViewer and I set VerticalScrollBarVisibility=Auto, if the scroll bar is required the Popup is not sized correctly. This looks like it was fixed in 4.0  ( at least my test case works in 2010 and not 2008 ) but I'm hoping there's a workaround for 2008 since I can't move to 2010 yet. Here's some example XAML which shows the issue


Events of September 2011 don't show up in calendar view and error on displaying october 2010 in cal



I actually faced a strange problem which is that when I add events in september 2011, they don't show up in the calendar view and the view remains empty but they appear in the all events view and another strange thing is that when I change the month to be october 2010, I get error page with the text:

An unexpected erro has occured.

web parts maintenance page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.

and I checked in more than one calendar and in more than one site and it's the same, So I'm asking if any one faced something like this.

Thanks in advance.

Displaying SharePoint lists in Web Parts

When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

Displaying Row Details Tooltip on GridView using JQuery

Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend