<%@ Page Language="C#" MasterPageFile="~/HostMasterPage.master" AutoEventWireup="true"CodeFile="~/DomainHomePageN.aspx.cs" Inherits="DomainHomePageN" Title="Web hosting in India,web hosting hyderabad" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <table> <tr> <td align="center" valign="bottom"> <table width="980" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff"class="border"><tr> <td align="center" valign="top" bgcolor="#ffffff" style="height: 20px;"> </td></tr> <tr> <td align="left" style="padding-left: 100px;"> <table style="font-family: Verdana; font-size: 12px; width: 400px;" cellpadding="0"cellspacing="0"><tr> <td style="width: 421px;"> <asp:GridView ID="gvNotAvail" runat="server" Caption="Not Available" Width="300px" CaptionAlign="left" GridLines="None" ShowHeader="false" AutoGenerateColumns="false"CellPadding="3" CellSpacing="3"> <Columns> <asp:BoundField DataField="domain" HeaderText="Domain" /> </Columns> </asp:GridView> </td> </tr> <tr> <td style="height: 30px;"></td> </tr> <tr> <td align="center" style="border-width: 1px; border-color: #cacaca; border-bottom-color: #cacaca; width: 421px;"> <div style='color: #996699; font-weight: bold; font-size: 16px;'> <table style="width: 522px;" cellpadding="0" cellspacing="0"> <tr> <td style="height: 25px; width: 232px;" class="style2" align="left"> <img height="13" src="images/getImage[8].gif" width="13" />Available (Domains) </td></tr></table> </div> <div style="overflow: scroll; overflow-x: hidden; height: 130px; border: solid 2px #cacaca; scrollbar-face-color: #cacaca; scrollbar-highlight-color: #cacaca; scrollbar-3dlight-color: #cacaca; scrollbar-darkshadow-color: #cacaca; scrollbar-shadow-color: #cacaca; scrollbar-arrow-color: #000000; scrollbar-track-color: #ffffff;"> <br /> <asp:GridView ID="gvAvail" Width="500px" CssClass="tableView" runat="server" ShowHeader="False"ShowFooter="True" GridLines="None" AutoGenerateColumns="False" CellPadding="4"CellSpacing="1" AllowSorting="True"> <Columns> <asp:TemplateField> <%--<EditItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("selected") %>' /> </EditItemTemplate>--%> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("selected") %>' Enabled="true" /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="domain" HeaderText="Domain"> <ItemStyle HorizontalAlign="Left" /> </asp:BoundField> <asp:TemplateField HeaderText="Price" ItemStyle-VerticalAlign="Top"> <%--<EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("price") %>'></asp:TextBox></EditItemTemplate>--%> <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" /> <ItemTemplate> <img src="images/rupeesymbol.jpg" alt="" /> <asp:Label ID="Label1" runat="server" Text='<%# Bind("price") %>'></asp:Label> /- </ItemTemplate> </asp:TemplateField> </Columns> <HeaderStyle HorizontalAlign="Left" /> <FooterStyle HorizontalAlign="Left" /> <AlternatingRowStyle BackColor="WhiteSmoke" Wrap="True" /> </asp:GridView> </div> </td> </tr> <tr> <td align="center"> <br /> <asp:Button ID="btnAddcart" runat="server" Text="Add To Cart" Font-Bold="True" Font-Names="Verdana"Font-Size="Medium" Height="36px" OnClick="btnAddcart_Click" Width="128px" /> <asp:HiddenField ID="hidden" runat="server" /> <asp:TextBox ID="txttotal" runat="server"></asp:TextBox> </td> </tr> </table>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"> </script> <script type="text/javascript"> $(function () { //Column index value of price field (Column index start from 1) var columnIndexValue = 3; var checked = $('input:checkbox').click(function (e) { var total = 0; $("tr:has(:checkbox:checked) td:nth-child(" + columnIndexValue + ")").each(function () { total += parseInt($(this).text()); }); $('#hidden').val(total.toFixed()); }); }); </script> </asp:Content
protected void btnAddcart_Click(object sender, EventArgs e) { Session["Dtotal"] = hidden.Value; Response.Redirect("CustSignUpPage.aspx"); //txttotal.Text = Session["Dtotal"].ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)