Click here to Skip to main content
14,641,506 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have data inside Datatable and I bind it to Datalist. Inside datalist their is HyperLink.Now I want to open a new Window on clicking Hyperlink. And I also want "Jobid"(Column inside Datatable) in New Window.

My code is this type...
<asp:DataList ID="dljobs" runat="server" Width="100%"  > <

ItemTemplate>  <table width="100%" style="border-collapse:collapse;">
   <tr>

<td colspan="2" class="links">
 <asp:HyperLink ID="hprJobtitle" runat="server" Text='<%#Eval("Job_Title") %>'  CssClass="links" Font-Size="14px"></asp:HyperLink>
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 2

<asp:hyperlink id="hprJobtitle" runat="server" target="_blank" text="<%#Eval("Job_Title") %>" cssclass="links" font-size="14px" navigateurl="<%#Eval("Job_id","JobSummary.aspx?ID={0}") %>" xmlns:asp="#unknown"></asp:hyperlink>
   
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

Try this
javascript file
function PopUpPassword(ref) {
        var strFeatures = "toolbar=no,status=no,menubar=no,location=no,scrollbars=no,resizable=no,height=220,width=280,left=300,top=300";
        newWin = window.open(ref, "Page_Title", strFeatures);
        newWin.opener = top;
    }

write in body
<a href="javascript:PopUpPassword('pagename.aspx')" title="New Window">New Window</a>

This will come as pop up.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100