Maybe this isn't what you're after, but it sounds like you might be able to
put a placeholder control on the form and then add your calendars
programmaticall y in the code behind. The following is C#, converted from VB
by Lutz Roeder's .NET Reflector (
http://www.aisto.com/roeder/dotnet/)
private void Page_Load(objec t sender, EventArgs e)
{ Calendar calendar1;
DateTime time1;
int num1;
DateTime time2;
num1 = 1;
L_0003:
calendar1 = new Calendar();
time2 = DateTime.Now;
calendar1.Today sDate = time2.AddMonths (num1);
time2 = DateTime.Now;
calendar1.Selec tedDate = time2.AddMonths (num1);
this.PlaceHolde r1.Controls.Add (calendar1);
num1 = (num1 + 1);
if (num1 <= 12)
{
goto L_0003;
}
}
<form id="Form1" method="post" runat="server">
<asp:PlaceHolde r id="PlaceHolder 1" runat="server"> </asp:PlaceHolder >
</form>
VB Code is here:
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArg s) Handles MyBase.Load
Dim calGen As Calendar
Dim intMonths As Integer
Dim dt As DateTime
For intMonths = 1 To 12
calGen = New Calendar
calGen.TodaysDa te = Date.Now.AddMon ths(intMonths)
calGen.Selected Date = Date.Now.AddMon ths(intMonths)
PlaceHolder1.Co ntrols.Add(calG en)
Next
End Sub
"js" <h2*******@NOSP AMwebuser.net> wrote in message
news:Qh******** *************** @bgtnsc04-news.ops.worldn et.att.net...
Any way to modify an <asp:Calendar > tag with parameters on the fly? Seems
I'm not allowed to use the <% =xxx %> substitution for parameters to the
<asp:Calendar > tag.
Do I have to do code behind procedures to intercept the creation of the
Calendar to modify the parameters using DOM?
Looking to generate multiple calendars, for different months, using a C#
programming loop rather than in-line code in the .aspx file.