accessing a calender object placed inside <asp:tablecell>

A

Aneesh a

hello ,

I am a.net developer recently i confronted with a problem that is while
desighning the page i placed <asp:calendar> inside table cell and try to
access it using a button click ,and i named it using 'id' tag.During
compiling it shows an error that
id name of calendar not existing.

I am entering the snippet of code here

<asp:TableCell ID="fromcol">
<asp:TextBox ID="datefrom" Runat="server" />
<asp:Calendar ID="fromdate" Runat="server" Visible="false" />
<asp:ImageButton Runat="server" OnClick="selectdate"
BackColor="#cc66cc" BorderColor="#6666ff" BorderStyle="Ridge" />
</asp:TableCell>

and select function is here


public void selectdate(object sender, System.Web.UI.ImageClickEventArgs e)
{
fromdate.Visible=true;
}

I have performed it in VS.net and the error shows that no such object named
"fromdate" exists.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top