Referencing a control inside a XSL Template from code behind ?
Posted
by Mina Samy
on Stack Overflow
See other posts from Stack Overflow
or by Mina Samy
Published on 2010-04-06T12:05:14Z
Indexed on
2010/04/06
12:23 UTC
Read the original article
Hit count: 280
sharepoint
Hi all I have a custom NewItem.aspx that I made by creating a new aspx from the exisiting one
I wanted to put a control in a row inside the XSL Template like this
<asp:DropDownList ID="ddlSectors" AutoPostBack="true" runat="server" __designer:bind="{ddwrt:DataBind('i',ddlSectors,'SelectedValue','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Sector')}">
</asp:DropDownList>
<!--<SharePoint:FormField runat="server" id="ff7{$Pos}" ControlMode="New" FieldName="Sector" __designer:bind="{ddwrt:DataBind('i',concat('ff7',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Sector')}"/>-->
<SharePoint:FieldDescription runat="server" id="ff7description{$Pos}" FieldName="Sector" ControlMode="New"/>
Now I want to reference ddlSectors from my code library but it always throws an object reference not set to an instatnce of an object.
I believe that this is becuase the control is inside the XSL template.
so is there any workaround for this ?
thanks
© Stack Overflow or respective owner