Expand|Select|Wrap|Line Numbers
- <%@ Page Title="" Language="C#" MasterPageFile="~/retailer/MasterPage.master" AutoEventWireup="true" CodeFile="frmprddet.aspx.cs" Inherits="retailer_Default" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script type="text/javascript" src="https://bytes.com/../js/jquery-1.7.1.js"></script> <script type="text/javascript" src="https://bytes.com/../js/jquery.colorbox.min.js"></script> <script type="text/javascript">
- jQuery(document).ready(function ($) {
- var a = "";
- $("#small-selector").colorbox({
- labels: [
- 'Black', 'Brown', 'Red', 'Columbia', 'DkGreen', 'Gold', 'Gray',
- 'YelloW', 'Maroon', 'Navy', 'Orange', 'Pink', 'Purple', 'Red', 'Royal', 'White'
- ],
- colors: [
- '000000', '502800', 'f30806', '1F2264', '003200', '646400', '4B4B4B', 'FFFF00',
- '320000', '000032', '643C00', '642864', '330032', '640000', '000064', 'fdfdfd'
- ],
- width: 30,
- height: 30,
- top: 0,
- left: 0,
- perLine: 4,
- onSelect: function ($selected, color, index, label) {
- $("#RosterHomeJersey").val(index);
- $("#ContentPlaceHolder1_TabContainer1_TabPanel1_txtcol").val(label);
- // alert("dff");
- if (a == '') {
- a = $("#ContentPlaceHolder1_TabContainer1_TabPanel1_txtcol").val();
- }
- else {
- a = a + "," + $("#ContentPlaceHolder1_TabContainer1_TabPanel1_txtcol").val();
- }
- $("#ContentPlaceHolder1_TabContainer1_TabPanel1_txtcol").val(a);
- }
- });
- $("#ContentPlaceHolder1_TabContainer1_TabPanel1_txtcol").keyup(function () {
- a = "";
- })
- });
- function ValidateCheckBoxList(sender, args) {
- var checkBoxList = document.getElementById("<%=CheckBox1.ClientID %>");
- var checkboxes = checkBoxList.getElementsByTagName("input");
- var isValid = false;
- for (var i = 0; i < checkboxes.length; i++) {
- if (checkboxes[i].checked) {
- isValid = true;
- break;
- }
- }
- args.IsValid = isValid;
- }
- </script> <h6>Product Details</h6> <p> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="465px" Width="633px"> <asp:TabPanel runat="server" HeaderText="Basic Details" ID="TabPanel1"> <ContentTemplate>
- ***********
- <br />
- ***********
- <table style="width: 100%; height: 280px;">
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Select Brand</td>
- *******************
- <td>
- ***********************
- <asp:DropDownList ID="drpbrd" runat="server" DataSourceID="ObjectDataSource1" DataTextField="brdnam" DataValueField="brdcod" AutoPostBack="True" ForeColor="#6699FF"> </asp:DropDownList>
- *******************
- </td>
- ***************
- </tr>
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Select Product Type</td>
- *******************
- <td>
- ***********************
- <asp:DropDownList ID="drpprdtyp" runat="server" DataSourceID="ObjectDataSource2" DataTextField="prdtypnam" DataValueField="prdtypcod" ForeColor="#6699FF"> </asp:DropDownList>
- *******************
- </td>
- ***************
- </tr>
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Product Name</td>
- *******************
- <td>
- ***********************
- <asp:TextBox ID="txtprdnam" runat="server" Width="300px"></asp:TextBox>
- ***********************
- *<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtprdnam" ErrorMessage="*"></asp:RequiredFieldValidator>
- *******************
- </td>
- ***************
- </tr>
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Price</td>
- *******************
- <td>
- ***********************
- <asp:TextBox ID="txtprc" runat="server" Width="300px"></asp:TextBox>
- ***********************
- <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtprc" ErrorMessage="*"></asp:RequiredFieldValidator>
- ***********************
- *<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ValidationExpression="^[0-9]{0,3}.?[0-9]{1}$" runat="server" ControlToValidate="txtprc" ErrorMessage="*"></asp:RegularExpressionValidator>
- *******************
- </td>
- ***************
- </tr>
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Colors Available</td>
- *******************
- <td>
- ***********************
- <table>
- ***************************
- <tr>
- *******************************
- <td>
- ***********************************
- <asp:TextBox ID="txtcol" runat="server" Height="19px" Width="295px"></asp:TextBox>
- *******************************
- </td>
- *******************************
- <td>
- ***********************************
- <div style="height: 57px;">
- ***************************************
- ***
- ***************************************
- <div style="position: relative;">
- *******************************************
- <div id="small-selector" style="width: 30px;height: 20px;cursor: pointer;background-color:red;">
- ***********************************************
- **
- *******************************************
- </div>
- ***************************************
- </div>
- ***********************************
- </div>
- *******************************
- </td>
- *******************************
- <td style="width: 3px">
- ***********************************
- <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ControlToValidate="txtcol"></asp:RequiredFieldValidator> </td>
- ***************************
- </tr>
- ***********************
- </table>
- *******************
- </td>
- ***************
- </tr>
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Sizes Available</td>
- *******************
- <td><table><tr><td> *<asp:CheckBoxList ID="CheckBoxList1" RepeatDirection="Horizontal" runat="server"> <asp:ListItem Value="M">Medium</asp:ListItem> <asp:ListItem Value="L">Large</asp:ListItem> <asp:ListItem Value="X">X-Large</asp:ListItem> </asp:CheckBoxList> </td><td style="width: 3px"> *<asp:CustomValidator ID="CustomValidator1" ErrorMessage="*"
- ForeColor="Black" ClientValidationFunction="ValidateCheckBoxList" runat="server" /> </td></tr></table>
- **********************
- **********************
- **********************
- *******************
- </td>
- ***************
- </tr>
- ***************
- <script type="text/javascript">
- function ValidateCheckBoxList(source, args) {
- var chkListModules = document.getElementById('<%= CheckBoxList1.ClientID %>');
- var chkListinputs = chkListModules.getElementsByTagName("input");
- for (var i = 0; i < chkListinputs.length; i++) {
- if (chkListinputs[i].checked) {
- args.IsValid = true;
- return;
- }
- }
- args.IsValid = false;
- }
- </script>
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Details</td>
- *******************
- <td>
- ***********************
- <asp:TextBox ID="txtdet" runat="server" Height="67px" TextMode="MultiLine" Width="300px"></asp:TextBox>
- ***********************
- <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtdet" ErrorMessage="*"></asp:RequiredFieldValidator>
- *******************
- </td>
- ***************
- </tr>
- ***************
- <tr>
- *******************
- <td style="width: 153px; color: #CC0066;">Composition</td>
- *******************
- <td>
- ***********************
- <asp:TextBox ID="txtcom" runat="server" Height="67px" TextMode="MultiLine" Width="297px"></asp:TextBox>
- ***********************
- <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtcom" ErrorMessage="*"></asp:RequiredFieldValidator>
- *******************
- </td>
- ***************
- </tr>
- ***************
- ***************
- <tr>
- *******************
- <td style="width: 153px">*</td>
- *******************
- <td>
- ***********************
- <asp:Button ID="Button1" runat="server" Text="Submit" OnClick="Button1_Click" ForeColor="#CC0066" />
- ***********************
- **
- ***********************
- <asp:Button ID="Button2" runat="server" Text="Cancel" ForeColor="#CC0066" />
- *******************
- </td>
- ***************
- </tr>
- ***************
- <tr>
- *******************
- <td style="width: 153px">*</td>
- *******************
- <td>
- ***********************
- <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="disp_rec" TypeName="nsshop.clsbrd"></asp:ObjectDataSource>
- ***********************
- <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="disp_rec" TypeName="nsshop.clsprdtyp"> <SelectParameters> <asp:ControlParameter ControlID="drpbrd" Name="brdcod" PropertyName="SelectedValue" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource>
- *******************
- </td>
- ***************
- </tr>
- ***********
- </table>
- *******
- </ContentTemplate> </asp:TabPanel> <asp:TabPanel runat="server" HeaderText="Images" ID="TabPanel2"> <ContentTemplate>
- **********
- <br />
- **********
- <table style="width: 100%">
- **************
- <tr>
- ******************
- <td style="width: 122px">Browse Image</td>
- ******************
- <td>
- **********************
- <asp:FileUpload ID="FileUpload1" runat="server" />
- ******************
- </td>
- **************
- </tr>
- **************
- <tr>
- ******************
- <td style="width: 122px">Set as main image</td>
- ******************
- <td>
- **********************
- <asp:CheckBox ID="CheckBox1" runat="server" />
- ******************
- </td>
- **************
- </tr>
- **************
- <tr>
- ******************
- <td style="width: 122px">*</td>
- ******************
- <td>
- **********************
- <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="Upload" />
- ******************
- </td>
- **************
- </tr>
- **************
- <tr>
- ******************
- <td colspan="2">
- **********************
- <asp:DataList ID="DataList1" runat="server" RepeatColumns="4" RepeatDirection="Horizontal" Width="616px" DataKeyField="prdpiccod" OnDeleteCommand="DataList1_DeleteCommand">
- **********************
- <ItemTemplate>
- **************************
- <table border="2">
- ******************************
- <tr>
- **********************************
- <td align ="center">
- ***************
- <img src="https://bytes.com/topic/asp-net/prdpics/<%#Eval("prdpiccod") %><%#Eval("prdpicpic") %>" height="120px" width="120px" />
- **********************************
- </td>
- ******************************
- </tr>
- ******************************
- <tr>
- **********************************
- <td align="center">
- *******************
- <asp:LinkButton ID="lk1" runat="server" CommandName="Edit" />
- **********************************
- </td>
- ******************************
- </tr>
- ******************************
- <tr>
- **********************************
- <td align="center">
- *****************
- <asp:LinkButton ID="lk2" runat="server" CommandName="Delete" Text="Delete" />
- **********************************
- </td>
- ******************************
- </tr>
- **************************
- </table>
- **********************
- </ItemTemplate>
- **********************
- </asp:DataList>
- ******************
- </td>
- **************
- </tr>
- **********
- </table>
- ******
- </ContentTemplate> </asp:TabPanel> </asp:TabContainer> </p> <p>
- *</p> </asp:Content>