Thanks for this post. But I was unable to do the same thing while using nested repeaters transformation.
Transformation Name:-
OSN.PopularPackage.PopularPackages
<li>
<img src="<%# Eval("image")%>" alt="<%# Eval("Title") %>">
<h4><%# LimitLength(Eval("Title").ToString(), 25 , "...") %></h4>
<p><%# LimitLength(Eval("SubTitle").ToString(), 25 , "...") %></p>
<div class="price">
<cms:CMSRepeater ID="nestedPackages" runat="server" ClassNames="OSN.Package" Path="/%" WhereCondition='<%# "NodeID =" + Eval("LinkedPackageNodeID") %>' DelayedLoading="true" StopProcessing="true" TransformationName="osn.package.PackagePrice" ></cms:CMSRepeater>
</div>
<a class="subscribe" href="<%# Eval("ButtonLink")%>"><%# LimitLength(Eval("ButtonText").ToString(), 10 , "...") %></a>
</li>
<script runat="server">
protected void Page_PreRender(object sender, EventArgs e)
{
nestedPackages.StopProcessing = false;
nestedPackages.ReloadData(true);
}
</script>
Trnsformation Name:-
osn.package.PackagePrice<p>
<%# GetCurrencySymbol() %>
<br>
<span><%#Eval("SubscriptionType")%></span>
</p>
<span class="digits"><%# GetCountryPrice(Eval("SubscriptionCharge")) %></span>
<asp:LinkButton runat="server" text="Click here" id="LinkButton1" OnClick="MyMethod" />
<script runat="server">
// Call your function within this event handler.
void MyMethod(object sender, EventArgs e)
{
OSN.SetPackage();
}
</script>
Now the same is not working.
Please let us know how to write an event for a button which resides in nested transformation.
Regards,
Suman