Skip to main content
Added formatting for code, reworded question to consolidate questions
Source Link

I am creating a visual web part to display the calendar events in the form of an events list with custom css. Since it is going to landThe web part will be on the home page is there a way for me to create the title (that I pull from the event list) as a link to edit the event? Hereof my site. Here is what I have right now and it is bound to a label control within an item template of a repeater. &nbsp&nbsp 'asp:Label ID="Date" runat="server" CssClass="dateStyle" Text='<%# Eval
("EventDate") %>' ></asp

  <asp:Label ID="Date" runat="server" CssClass="dateStyle" Text='<%# Eval ("EventDate") %>' >   </asp:Label>
  <br />

A few questions:Label>

  1. How could I possibly reformat the EventDate (format ex:"3/23/2012 12:00:00AM") to say March 23 at 12:00AM? Thanks
  1. How could I possibly reformat the EventDate (format ex:"3/23/2012 12:00:00AM") to say March 23 at 12:00AM?
  2. Is there a way for me to create the title (that I pull from the event list) as a link to edit the event? Thanks

I am creating a visual web part to display the calendar events in the form of an events list with custom css. Since it is going to land on the home page is there a way for me to create the title (that I pull from the event list) as a link to edit the event? Here is what I have right now and it is bound to a label control within an item template of a repeater. &nbsp&nbsp 'asp:Label ID="Date" runat="server" CssClass="dateStyle" Text='<%# Eval
("EventDate") %>' ></asp:Label>

  1. How could I possibly reformat the EventDate (format ex:"3/23/2012 12:00:00AM") to say March 23 at 12:00AM? Thanks

I am creating a visual web part to display the calendar events in the form of an events list with custom css. The web part will be on the home page of my site. Here is what I have right now and it is bound to a label control within an item template of a repeater:

  <asp:Label ID="Date" runat="server" CssClass="dateStyle" Text='<%# Eval ("EventDate") %>' >   </asp:Label>
  <br />

A few questions:

  1. How could I possibly reformat the EventDate (format ex:"3/23/2012 12:00:00AM") to say March 23 at 12:00AM?
  2. Is there a way for me to create the title (that I pull from the event list) as a link to edit the event? Thanks
Source Link
user7400
  • 1.3k
  • 7
  • 43
  • 66

How do I retrieve the "Title (linked to edit)" column from event list to display in my custom web part.

I am creating a visual web part to display the calendar events in the form of an events list with custom css. Since it is going to land on the home page is there a way for me to create the title (that I pull from the event list) as a link to edit the event? Here is what I have right now and it is bound to a label control within an item template of a repeater. &nbsp&nbsp 'asp:Label ID="Date" runat="server" CssClass="dateStyle" Text='<%# Eval
("EventDate") %>' ></asp:Label>

  1. How could I possibly reformat the EventDate (format ex:"3/23/2012 12:00:00AM") to say March 23 at 12:00AM? Thanks