<div class="form-horizontal well"> <fieldset> <legend>Select Details</legend> <table> <tr> <td>Year</td> <td> <asp:TextBox ID="txtyear" CssClass="form-control" runat="server"></asp:TextBox> </td> <td> Select Month </td> <td> <asp:DropDownList ID="ddlmnth" CssClass="form-control" runat="server"> </asp:DropDownList> </td> <td> <asp:Button ID="btnOK" runat="server" Text="OK" Width="80px" CssClass="btn btn-sm btn-success" onclick="btnOK_Click" /> </td> </tr> </table> </fieldset> </div> <br /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Repeater ID="Repeater1" runat="server"> <HeaderTemplate> <table class="table table-bordered table-hover"> <thead class="bg-dark lt"> <tr> <th> S.No# </th> <th> Project </th> <th> Job Code </th> <th> Status </th> <th> Date </th> <th> Action </th> </tr> </thead> <tbody> </HeaderTemplate> <ItemTemplate> <tr id="itemrow"> <td valign="middle" style="width: 50px"> <%# Container.ItemIndex + 1 %> </td> <td> "color: rgba(255, 165, 0, 1)"> </td> <td> ^__b> <asp:Label ID="lblstatus" runat="server" Text='<%# Eval("status") %>'></asp:Label> </td> <td> ^__b> <%# Eval("Pdate") %> </td> <td> <asp:Button ID="btnrpt" CommandArgument='<%# Eval("RecID") %>' OnClick="btnrpt_Click" runat="server" Text="Report" CssClass="btn btn-sm btn-info" /> </td> </tr> </ItemTemplate> <FooterTemplate> </tbody> </table> </FooterTemplate> </asp:Repeater> </ContentTemplate> <Triggers> <%--<asp:AsyncPostBackTrigger ControlID="btnOK" />--%> <asp:PostBackTrigger ControlID="btnOK" /> </Triggers> </asp:UpdatePanel>
protected void btnrpt_Click(object sender, EventArgs e) { int prjid = Convert.ToInt32(((Button)(sender)).CommandArgument.ToString()); Response.Write("<script>"); Response.Write("window.open('PrjDetails.aspx?RECID=" + prjid + "','_blank')"); Response.Write("</script>"); }
Response
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)