using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class ProductSubCategory : System.Web.UI.Page { Cls_FF c1 = new Cls_FF(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { filldl_subcategory(); } } public void filldl_subcategory() { DataList2.DataSource = c1.selectDS("select * from ProSubCategory WHERE ProductId='" + Session["Pro_id"] + "'"); DataList2.DataBind(); } protected void DataList2_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "details") { string _subcatid; _subcatid = ((Label)DataList2.Items[e.Item.ItemIndex].FindControl("lbl_subid")).Text; Session.Add("subcatid", _subcatid); Response.Redirect("ProductDetail.aspx"); } } }
<%@ Page Title="" Language="C#" MasterPageFile="~/UserMasterPage.master" AutoEventWireup="true" CodeFile="ProductSubCategory.aspx.cs" Inherits="ProductSubCategory" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <style type="text/css"> .style6 { width: 100%; } .style12 { width: 100%; height: 144px; } .style13 { width: 100%; height: 93px; } .style14 { width: 100%; height: 49px; } .style18 { width: 100%; height: 30px; } </style> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table align="center" cellpadding="5" cellspacing="0" class="style6"> <tr> <td align="center" class="style18"> <asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="#663300" Text="Product Details"> </td> </tr> <tr> <td align="left"> <asp:DataList ID="DataList2" runat="server" onitemcommand="DataList2_ItemCommand" RepeatColumns="2"> <table align="center" cellpadding="5" cellspacing="0" class="style6"> <tr> <td> <table align="center" cellpadding="5" cellspacing="0" class="style6"> <tr> <td align="center" class="style9"> <asp:ImageButton ID="ImageButton2" runat="server" CommandName="Details" Height="112px" ImageUrl='<%# Eval("Image") %>' PostBackUrl="~/GemsDetails.aspx" Width="137px" /> </td> <td align="left"> <table align="center" cellpadding="5" cellspacing="0" class="style6"> <tr> <td align="center"> <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Vani" ForeColor="#FF9900" Text='<%# Eval("SubCategoryName") %>'>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)