I want to display a size restricted window with no menu bar from a Hyperlink control in a Datalist. The URL needs to also pass the CompanyID.
The only way i know to open a mini window is using Javascript, so I am trying to combine the call to the Javascript function with the Databinder of the CompanyID. The end URL should look like this:
admin/Homepage.aspx?companyid=1
Here's the code:
===========================================================
<aspataList id="myDataList" CellPadding="4" Width="98%" EnableViewState="false" runat="server">
<ItemTemplate>
<span class="ItemTitle">
<asp:HyperLink NavigateUrl="javascriptpenWindowScroll('admin/Homepage.aspx?companyid=')" Text=<%# DataBinder.Eval(Container.DataItem,"CompanyName" %> runat="server" />
</span>
<br>
<span class="Normal">
Joined <%# DataBinder.Eval(Container.DataItem,"RegDate" %>
</span>
<br>
</ItemTemplate>
</aspataList>
===========================================================
Here's what i want to crowbar into it:
===========================================================
<%# DataBinder.Eval(Container.DataItem,"CompanyID" %>
===========================================================
Setting the NavigateURL to the Javascript on its own works, as does the DataBinder on its own, but i can't combine them without a syntax error. Is it possible or have i got the wrong approach?
cheers in advance,
si
The only way i know to open a mini window is using Javascript, so I am trying to combine the call to the Javascript function with the Databinder of the CompanyID. The end URL should look like this:
admin/Homepage.aspx?companyid=1
Here's the code:
===========================================================
<aspataList id="myDataList" CellPadding="4" Width="98%" EnableViewState="false" runat="server">
<ItemTemplate>
<span class="ItemTitle">
<asp:HyperLink NavigateUrl="javascriptpenWindowScroll('admin/Homepage.aspx?companyid=')" Text=<%# DataBinder.Eval(Container.DataItem,"CompanyName" %> runat="server" />
</span>
<br>
<span class="Normal">
Joined <%# DataBinder.Eval(Container.DataItem,"RegDate" %>
</span>
<br>
</ItemTemplate>
</aspataList>
===========================================================
Here's what i want to crowbar into it:
===========================================================
<%# DataBinder.Eval(Container.DataItem,"CompanyID" %>
===========================================================
Setting the NavigateURL to the Javascript on its own works, as does the DataBinder on its own, but i can't combine them without a syntax error. Is it possible or have i got the wrong approach?
cheers in advance,
si