How can I populate fields from my calendar control day render event

I'm using a Calendar control to view events that are coming from a SQL DB. I can show multiple events per day within the DayRender method by looping through a collection of calendar items. The Calendar control sits within an AJAX Update control. What I want to do is have the ability for users to select a link for a particular event that will populate some textbox controls so that I can then edit/save/delete the calendar item.

The way I'm doing it now is a bit cumbersome and also it refreshes the page which I do not want it to do.
Any ideas on a better more elegant solution would be greatly appreciated.

I've attached the DayRender method

Many thanks
e.Cell.VerticalAlign = VerticalAlign.Top;
        e.Cell.Style.Add("Height", "60px");
        e.Cell.Style.Add("CellPadding", "1px");
        e.Cell.Controls.Add(new LiteralControl("<table ID=\"tblCal\" width='100%'>"));
 
        CalendarItemsFacade cal = new CalendarItemsFacade();
 
        foreach (ICalendarItems calendarItem in cal.GetAllCalendarItems())
        {
            if (calendarItem.EventDate == e.Day.Date)
            {
                e.Day.IsSelectable = false;
                e.Cell.BackColor = ColorTranslator.FromHtml("#64a8ef");
                HyperLink myLink = new HyperLink();
 
                if (calendarItem.Title.Length >= 10)
                {
                    string myString = calendarItem.Title.Substring(0, 7);
                    myLink.Text = myString.PadRight(10, '.');
                }
                else
                {
                    myLink.Text = calendarItem.Title;
                }
 
                e.Cell.Controls.Add(new LiteralControl("<tr><td style=\"width:98px\" valign=\"top\" align=\"left\"><li><a href='default.aspx?calID=" + calendarItem.ID + " '>" + myLink.Text + "</a></li></td></tr>"));
            }
        }
 
        e.Cell.Controls.Add(new LiteralControl("</table>"));

Open in new window

BrowskiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RejojohnyCommented:
so what you mean is that you need to click on a date and you must get a ability to enter some fields and they need to be attached to the date you just clicked?

Rejo
0
BrowskiAuthor Commented:
Basically I have multiple events per day, in my case the title of the event is a hyperlink that when I click it I want to populate title, description and date text boxes on the form
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.