Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Adding extender dynamically during partial rendering

$
0
0

Ok, so I want to dynamically add a textbox and calendar extender when asked.  This is a result of a specific button click within an update panel.

Action Steps;

  1. Page Rendered 
  2. Item Selected [triggering updatepanel postback]
  3. programmatically add textbox and extender
Private Sub CreateSingleDateControl(ByVal rItem As ReportItem, ByVal ParameterIndex As Integer, ByVal toReturn As Panel)
        Dim sdate As New TextBox
        Dim popup As New AjaxControlToolkit.CalendarExtender
        sdate.ID = rItem.ParameterNames(ParameterIndex)
        popup.TargetControlID = sdate.ID
        toReturn.Controls.Add(sdate)
        toReturn.Controls.Add(popup)
    End Sub

Unfortunately, while the control is rendered on the page it appears that the extender is not (the javascript).  I have added the same 'control' outside of the update panel on first load to ensure that the toolkit is functional and it works fine.

Suggestions?

Steve


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>