HELLO!!!!!!!!!! !!!
me using
ASP.net 2.0, language VB.net!
working tool Visula studio.Net 2005
I HAVE CREATED A simple WEB User control (calender.ascx) having
a text box ,
a button,
and a calender control
AND THE CODE BEHIND FILE MY CODING IS (calender.ascx. vb) is as follow
through which i show the selected date in my textbox and the button helps in hiding and displaying the calender
MY PROBLEM
how can i get the value of this calender.ascx in another page!!!
OR how to use and get the Value of t his control in other pages of my application
kindly guide me !!!!!!!!!!!!!!! !!!11
me using
ASP.net 2.0, language VB.net!
working tool Visula studio.Net 2005
I HAVE CREATED A simple WEB User control (calender.ascx) having
a text box ,
a button,
and a calender control
Code:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="calender.ascx.vb" Inherits="calender" %>
<table style="width: 190px; height: 186px;">
<tr>
<td align="center" colspan="2" style="width: 77px; height: 33px;">
<asp:TextBox ID="txtdate" runat="server"></asp:TextBox></td>
<td style="width: 141px; height: 33px;">
<asp:Button ID="btnshow" runat="server" Text="+" /></td>
</tr>
<tr>
<td colspan="3" rowspan="2" style="height: 95px">
<asp:Calendar ID="myCalendar" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66"
BorderWidth="1px" DayNameFormat="Short" Font-Names="Verdana" Font-Size="8pt"
ForeColor="#663399" Height="144px" ShowGridLines="True" Width="180px" VisibleDate="2/12/2009" UseAccessibleHeader="true" DayStyle-Font-Italic="false" Font-Bold="true" SelectedDayStyle-BorderStyle="NotSet" SelectionMode="DayWeekMonth" DayStyle-Font-Bold="true" NextPrevFormat="ShortMonth" Visible="False">
<SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
<TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
<SelectorStyle BackColor="#FFCC66" />
<OtherMonthDayStyle ForeColor="#CC9966" />
<NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
<DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
<TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" ForeColor="#FFFFCC" />
<DayStyle Font-Italic="True" Font-Bold="True" />
</asp:Calendar>
</td>
</tr>
<tr>
</tr>
</table>
AND THE CODE BEHIND FILE MY CODING IS (calender.ascx. vb) is as follow
through which i show the selected date in my textbox and the button helps in hiding and displaying the calender
Code:
Public Sub myCalendar_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles myCalendar.SelectionChanged
txtdate.Text = myCalendar.SelectedDate
End Sub
Protected Sub btnshow_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnshow.Click
If (myCalendar.Visible = True) Then
myCalendar.Visible = False
Else
myCalendar.Visible = True
End If
End Sub
how can i get the value of this calender.ascx in another page!!!
OR how to use and get the Value of t his control in other pages of my application
kindly guide me !!!!!!!!!!!!!!! !!!11
Comment