I am using a Datalist control as a Menu ..with choices of DeparmentID to select from .... using the ASP Hyperlink control.
It works great! ... However when a Department link is clicked I want it to open a NEW window instead of replacing the current window ... Am I using the right control i.e. the Hyperlink?
Also I want to implement something like this javascript so that the SAME 2nd window is opened regardless of the DepartmentID selection that is made.
Dim strClientCall As String
strClientCall = "<script language=javascript> "
strClientCall &= "var winQExp= window.open(" & "'default2.aspx?DepartmentID=????'" & ");"
strClientCall &= "winQExp.focus();"
'strClientCall &= " window.open(" & "'WebFrmQExplorer.aspx?'" & ")"
strClientCall &= "</script>"
Response.Write(strClientCall)
'here is the Datalist .....
<asp
ataList id="list" runat="server" CellPadding="0">
<HeaderTemplate>
<IMG alt="" src="Images/DeptHeader.gif" border="0">
</HeaderTemplate>
<SelectedItemTemplate>
»
<asp:HyperLink id="HyperLink2" runat="server" NavigateUrl='<%# "../default.aspx?DepartmentID=" & DataBinder.Eval(Container.DataItem, "departmentID") & "&DepartmentIndex=" & Container.ItemIndex %>' Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' CssClass="DepartmentSelected">
</asp:HyperLink>
</SelectedItemTemplate>
<FooterTemplate>
<IMG alt="" src="Images/DeptFooter.gif" border="0">
</FooterTemplate>
<ItemStyle BackColor="Yellow"></ItemStyle>
<ItemTemplate>
»
<asp:HyperLink id="HyperLink1" runat="server" NavigateUrl='<%# "../default.aspx?DepartmentID=" & DataBinder.Eval(Container.DataItem, "departmentID") & "&DepartmentIndex=" & Container.ItemIndex %>' Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' CssClass="DepartmentUnselected">
</asp:HyperLink>
</ItemTemplate>
<HeaderStyle BackColor="Yellow"></HeaderStyle>
</asp
ataList>
... any help?
It works great! ... However when a Department link is clicked I want it to open a NEW window instead of replacing the current window ... Am I using the right control i.e. the Hyperlink?
Also I want to implement something like this javascript so that the SAME 2nd window is opened regardless of the DepartmentID selection that is made.
Dim strClientCall As String
strClientCall = "<script language=javascript> "
strClientCall &= "var winQExp= window.open(" & "'default2.aspx?DepartmentID=????'" & ");"
strClientCall &= "winQExp.focus();"
'strClientCall &= " window.open(" & "'WebFrmQExplorer.aspx?'" & ")"
strClientCall &= "</script>"
Response.Write(strClientCall)
'here is the Datalist .....
<asp
<HeaderTemplate>
<IMG alt="" src="Images/DeptHeader.gif" border="0">
</HeaderTemplate>
<SelectedItemTemplate>
»
<asp:HyperLink id="HyperLink2" runat="server" NavigateUrl='<%# "../default.aspx?DepartmentID=" & DataBinder.Eval(Container.DataItem, "departmentID") & "&DepartmentIndex=" & Container.ItemIndex %>' Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' CssClass="DepartmentSelected">
</asp:HyperLink>
</SelectedItemTemplate>
<FooterTemplate>
<IMG alt="" src="Images/DeptFooter.gif" border="0">
</FooterTemplate>
<ItemStyle BackColor="Yellow"></ItemStyle>
<ItemTemplate>
»
<asp:HyperLink id="HyperLink1" runat="server" NavigateUrl='<%# "../default.aspx?DepartmentID=" & DataBinder.Eval(Container.DataItem, "departmentID") & "&DepartmentIndex=" & Container.ItemIndex %>' Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>' CssClass="DepartmentUnselected">
</asp:HyperLink>
</ItemTemplate>
<HeaderStyle BackColor="Yellow"></HeaderStyle>
</asp
... any help?