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.
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.