M
Monty
[ASP.Net 2.0, WAP, Atlas]
I have a custom usercontrol that looks something like this:
<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="ItemPicker.ascx.vb" Inherits="myNS.ItemPicker" %>
<div runat=server id=divMain style="text-align:justify; overflow-x:hidden;">
<div id="divItemList" class="ItemPickerList" runat="server">
<asp:Repeater ID="rprItems" runat="server">
<ItemTemplate>
<div class=ItemPickerItem id='<%#me.uniqueID
%>_<%#Container.DataItem("ItemID")%>'><%#Container.DataItem("Description")%></div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
In the Page_Load of this control, Me.ClientID =
"ctl00_ContentPlaceHolder1_ItemPicker1". However, when I look at the page
that is rendered, there is no element that has
"ctl00_ContentPlaceHolder1_ItemPicker1" as an ID. There is, of course,
"ctl00_ContentPlaceHolder1_ItemPicker1_divMain". I kinda thought if a
control had a client ID it would, uhhh, have that ID on the client. I tried
wrapping it all in a DIV and setting the DIV ID like so: <div
id='<%=me.clientID%>', but that was a no-go of course. The only reason I
care is because in the page that hosts this control I am registering the
control for AsyncPostBack (like
ScriptManager.RegisterAsyncPostBackControl(ItemPicker1)). In the
__doPostBack event, it is looking for a control with the ID of
"ctl00_ContentPlaceHolder1_ItemPicker1", but of course can't find it. Any
suggestions? TIA!
(Bonus question: is there a MS newsgroup for Atlas?)
I have a custom usercontrol that looks something like this:
<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="ItemPicker.ascx.vb" Inherits="myNS.ItemPicker" %>
<div runat=server id=divMain style="text-align:justify; overflow-x:hidden;">
<div id="divItemList" class="ItemPickerList" runat="server">
<asp:Repeater ID="rprItems" runat="server">
<ItemTemplate>
<div class=ItemPickerItem id='<%#me.uniqueID
%>_<%#Container.DataItem("ItemID")%>'><%#Container.DataItem("Description")%></div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
In the Page_Load of this control, Me.ClientID =
"ctl00_ContentPlaceHolder1_ItemPicker1". However, when I look at the page
that is rendered, there is no element that has
"ctl00_ContentPlaceHolder1_ItemPicker1" as an ID. There is, of course,
"ctl00_ContentPlaceHolder1_ItemPicker1_divMain". I kinda thought if a
control had a client ID it would, uhhh, have that ID on the client. I tried
wrapping it all in a DIV and setting the DIV ID like so: <div
id='<%=me.clientID%>', but that was a no-go of course. The only reason I
care is because in the page that hosts this control I am registering the
control for AsyncPostBack (like
ScriptManager.RegisterAsyncPostBackControl(ItemPicker1)). In the
__doPostBack event, it is looking for a control with the ID of
"ctl00_ContentPlaceHolder1_ItemPicker1", but of course can't find it. Any
suggestions? TIA!
(Bonus question: is there a MS newsgroup for Atlas?)