Wednesday, March 28, 2012

control extender for drag and drop - help

I am trying to get drag and drop to work with data dynamically populated from a database. The basic structure layout of the page is based on the work done by Garbin at:

http://aspadvice.com/blogs/garbin/archive/2006/01/17/14730.aspx

I have a master page and some user controls to populate different areas of the page. One of the user controls gets the data from the database and then creates the HTML of the form:

<div id="content1" class="item"> <div id="content1Handle" class="itemHandle">Content 1</div> <div class="itemContent"> <asp:Login ID="myLogin" runat="server" CssClass="centered"></asp:Login> </div> </div> <div id="content2" class="item"> <div id="content2Handle" class="itemHandle">Content 2</div> <div class="itemContent"> <asp:TextBox ID="myTextBox" runat="server"></asp:TextBox> <asp:Button ID="myButton" runat="server" Text="ClickMe" /> </div> </div>

This works OK, but to create the drag and drop behavior, I need to add the following after the end of the </form> tag …

</form> <script type="text/xml-script"> <page> <components><!-- Left Area --> <control id="leftArea"> <behaviors> <dragDropList dataType="HTML" acceptedDataTypes="'HTML'" dragMode="Move" direction="Vertical"> <dropCueTemplate> <template layoutElement="dropCueTemplate" /> </dropCueTemplate> <emptyTemplate> <template layoutElement="emptyTemplate" /> </emptyTemplate> </dragDropList> </behaviors> </control><!-- Right Area --> <control id="rightArea"> <behaviors>

BUT, I do not know how … it has been suggested that I use a control extender, but having viewed the ATLAS vids on the MS website, I cannot understand how a control extender will be able to dynamically create this code after the </form> tag ?

Any ideas anyone ?

Thanks

anyone ? please ... Crying

No comments:

Post a Comment