ASP.NET User Control Value

Posted by Steven on Stack Overflow See other posts from Stack Overflow or by Steven
Published on 2010-04-09T20:25:53Z Indexed on 2010/04/09 20:33 UTC
Read the original article Hit count: 530

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about vb.net