ASP.NET User Control Value
- by Steven
I created a DatePicker user control (ASP code below, no code behind) which is simply a textbox, image button, and a sometimes visible calendar.
<%@ Control Language="vb" AutoEventWireup="false" _
CodeBehind="myDatePicker.ascx.vb"
Inherits="Website.myDate" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" _
tagprefix="asp" %>
<asp:TextBox ID="Date1" runat="server"></asp:TextBox>
<asp:Image ID="Image1" runat="server" ImageUrl="~/Calendar_scheduleHS.png" />
<asp:CalendarExtender ID="Date1_CalendarExtender" runat="server" Enabled="True"
TargetControlID="Date1" PopupButtonID="Image1" >
</asp:CalendarExtender>
Can I somehow tie or pass the value of the TextBox as the value of the whole control to use in the calling code?