Subscribe to Subscribers
Talk to Webmaster Tony John


Forums » .NET » HTML »

asp.net


Posted Date: 25 Aug 2008      Posted By:: anil kumar prathipati     Member Level: Silver    Member Rank: 2948     Points: 1   Responses: 2



<%@ Register tagprefix="top" tagname="top1" src="top.ascx" %>
<%@ Page language="c#" Codebehind="App_Code/product_insert.aspx.cs" AutoEventWireup = "false" Inherits="catalogmanager_new.WebForm4" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="\\localweb\e$\catalogmanager_new\css\style.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<div align="center">
<form id="Form1" name="Form2" runat="server">
<top:top1 id="aa" runat="server"></top:top1>
<TABLE cellSpacing="0" cellPadding="0" width="900" border="0">
<tr>
<td width="900">
<table cellSpacing="0" cellPadding="0" width="900" bgColor="#ffffff" border="0">
<tr>
<td width="177" height="507"><!--left -->
<asp:Panel id="Panel1" runat="server" BackColor="Maroon" Width="172px" Height="1147px"></asp:Panel> <!--left --></td>
<td width="726" height="507"> <!--main -->        
<TABLE id="Table1" style="WIDTH: 578px; HEIGHT: 407px" cellSpacing="1" cellPadding="4" width="578" align="center" border="0">
<TR>
<TD bgColor="#ff6c2f" colSpan="3" height="1"></TD>
</TR>
<TR>
<TD colSpan="3" height="29">                                                                     NEW PRODUCT
</TD>
</TR>
<TR>
<TD width = "169" height="25">Category</TD>
<TD colSpan="2" height="25">
<asp:DropDownList id="DropDownList1" runat="server" BackColor="#FFE0C0" Width="136px" Height="22px" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
<asp:ListItem Value="Select">Select</asp:ListItem>
</asp:DropDownList>
<asp:TextBox id="TextBox1" runat="server" BackColor="#FFE0C0" Width="2px" Height="22px" Visible="False">
</asp:TextBox>
</TD>
</TR>
<TR>
<TD width="169" height="12">SubCategory</TD>
<TD colSpan="2" height="12">
<asp:DropDownList id="DropDownList2" runat="server" BackColor="#FFE0C0" Width="136px" Height="22px" AutoPostBack="True" onselectedindexchanged="DropDownList2_SelectedIndexChanged">
<asp:ListItem Value="select">select</asp:ListItem>
</asp:DropDownList>
<asp:TextBox id="TextBox8" runat="server" BackColor="#FFE0C0" Width="2px" Height="22px" Visible="False"></asp:TextBox></TD>
</TR>
<TR>
<TD width="169" height="24">Product Type</TD>
<TD colSpan="2" height="24">
<asp:DropDownList id="DropDownList5" runat="server" BackColor="#FFE0C0" Width="137px" Height="22px"
AutoPostBack="True" onselectedindexchanged="DropDownList5_SelectedIndexChanged">
<asp:ListItem Value="select">select</asp:ListItem>
</asp:DropDownList>
<asp:TextBox id="TextBox9" runat="server" BackColor="#FFE0C0" Width="2px" Height="22px" Visible="False"></asp:TextBox></TD>
</TR>
<TR>
<TD width="169" height="21">Fabric Name</TD>
<TD colSpan="2" height="21">
<asp:TextBox id="TextBox10" runat="server" BackColor="#FFE0C0" Width="134px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD width="169" height="22">Product Name</TD>
<TD colSpan="2" height="22">
<asp:TextBox id="TextBox2" runat="server" BackColor="#FFE0C0" Width="135px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD width="169" height="12">Base Colour</TD>
<TD colSpan="2" height="12">
<P>
<asp:DropDownList id="DropDownList4" runat="server" Width="140px" AutoPostBack="True" onselectedindexchanged="DropDownList4_SelectedIndexChanged">
<asp:ListItem Value="Select">Select</asp:ListItem>
<asp:ListItem Value="Red">Red</asp:ListItem>
<asp:ListItem Value="Green">Green</asp:ListItem>
<asp:ListItem Value="Yellow">Yellow</asp:ListItem>
<asp:ListItem Value="Grey">Grey</asp:ListItem>
<asp:ListItem Value="Brown">Brown</asp:ListItem>
<asp:ListItem Value="Gold">Gold</asp:ListItem>
<asp:ListItem Value="White">White</asp:ListItem>
<asp:ListItem Value="Blue">Blue</asp:ListItem>
<asp:ListItem Value="Black">Black</asp:ListItem>
<asp:ListItem Value="Orange">Orange</asp:ListItem>
<asp:ListItem Value="Purple">Purple</asp:ListItem>
<asp:ListItem Value="Combination">Combination</asp:ListItem>
</asp:DropDownList>
<asp:HyperLink Target="blank" id="HyperLink1" runat="server" Visible="False" NavigateUrl="color.aspx">open</asp:HyperLink></P>
</TD>
</TR>
<TR>
<TD width="169" height="118">Select Colour</TD>
<TD width="171" height="118">
<P>
<asp:ListBox id="ListBox1" runat="server" Height="162px" Width="135px" BackColor="#FFE0C0" AutoPostBack="True" onselectedindexchanged="ListBox1_SelectedIndexChanged"></asp:ListBox>       </P>
<P>
<asp:Image id="Image2" runat="server" Height="36px" Width="35px"></asp:Image>                     
<INPUT class="modify_cancel" id="Submit3" style="WIDTH: 40px; HEIGHT: 18px" type="submit"
value=">>" name="Submit" runat="server" onserverclick="Submit3_ServerClick"></P>
</TD>
<TD colSpan="2" height="118">
<asp:ListBox id="ListBox2" runat="server" Height="205px" Width="132px" BackColor="#FFE0C0" AutoPostBack="True"></asp:ListBox>
<asp:Image id="Image3" runat="server" Height="38px"></asp:Image>              
<INPUT class="modify_cancel" id="Submit4" style="WIDTH: 40px; HEIGHT: 18px" type="submit"
value="<<" name="Submit" runat="server" onserverclick="Submit4_ServerClick"></TD>
</TR>
<TR>
<TD width="169" height="24">Default Colour</TD>
<TD width="171" height="24">
<asp:DropDownList id="DropDownList3" runat="server" Height="22px" Width="137px" BackColor="#FFE0C0"
AutoPostBack="True" onselectedindexchanged="DropDownList3_SelectedIndexChanged"></asp:DropDownList></TD>
<TD colSpan="2" height="24">
<asp:Image id="Image5" runat="server" Width="28px"></asp:Image>      
</TD>
</TR>
<TR>
<TD width="169" height="46">Product Description</TD>
<TD colSpan="2" height="46">
<asp:TextBox id="TextBox3" runat="server" BackColor="#FFE0C0" Width="344px" Height="80px" TextMode="MultiLine"></asp:TextBox></TD>
</TR>
<TR>
<TD width="169" height="23">Image (Small)</TD>
<TD colSpan="2" height="23"><INPUT type="file" name="File1" runat="server" id="File1"> </TD>
</TR>
<TR>
<TD width="169" height="23">Image (Medium)</TD>
<TD colSpan="2" height="23"><INPUT id="File2" type="file" name="File2" runat="server"></TD>
</TR>
<TR>
<TD width="169" height="33">Image (Large)</TD>
<TD colSpan="2" height="33"><INPUT id="File3" type="file" name="File3" runat="server"></TD>
</TR>
<TR>
<TD width="169" height="23">Item Price</TD>
<TD colSpan="2" height="23">
<asp:TextBox id="TextBox4" runat="server" BackColor="#FFE0C0" Width="134px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD width="169" height="25">Whole Sale Price</TD>
<TD colSpan="2" height="25">
<asp:TextBox id="TextBox5" runat="server" BackColor="#FFE0C0" Width="134px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD width="169" height="13">Discount Price</TD>
<TD colSpan="2" height="13">
<asp:TextBox id="TextBox6" runat="server" BackColor="#FFE0C0" Width="134px" Height="22px"></asp:TextBox>
<asp:Label id="Label1" runat="server" Visible="False"></asp:Label></TD>
</TR>
<TR>
<TD width="169" height="10">Retail Price</TD>
<TD colSpan="2" height="10">
<asp:TextBox id="TextBox7" runat="server" BackColor="#FFE0C0" Width="134px" Height="22px"></asp:TextBox>
<asp:Label id="Label2" runat="server" Visible="False"></asp:Label></TD>
</TR>
<TR>
<TD width="169" height="23">Status</TD>
<TD background="#FFE0C0" colSpan="2" height="23">
Active</TD>
</TR>
<TR>
<TD width="157" height="23">Status On Other Sub-Category</TD>
<TD background="#FFE0C0" colSpan="2" height="23">
<asp:Panel id="Panel2" runat="server" BackColor="#FFE0C0" Height="108px" Width="485px">
<P> 
<asp:CheckBox id="CheckBox15" runat="server" Text="New Arrival"></asp:CheckBox> 
<asp:CheckBox id="CheckBox1" runat="server" Width="54px" Text="Prom"></asp:CheckBox> 
<asp:CheckBox id="CheckBox14" runat="server" Width="56px" Text="Spring"></asp:CheckBox>
<asp:CheckBox id="CheckBox11" runat="server" Text="Evening"></asp:CheckBox>
<asp:CheckBox id="CheckBox12" runat="server" Text="Plus Size"></asp:CheckBox>
<asp:CheckBox id="CheckBox9" runat="server" Width="6px" Text="Hot"></asp:CheckBox> 
</P>
<P> 
<asp:CheckBox id="CheckBox3" runat="server" Width="86px" Text="Two Piece"></asp:CheckBox>  
<asp:CheckBox id="CheckBox17" runat="server" Text="Bridal"></asp:CheckBox> 
<asp:CheckBox id="CheckBox16" runat="server" Text="Fall "></asp:CheckBox>    
<asp:CheckBox id="CheckBox4" runat="server" Text="Top Dress"></asp:CheckBox> 
<asp:CheckBox id="CheckBox6" runat="server" Width="64px" Text="Designer"></asp:CheckBox>  </P>
<P> 
<asp:CheckBox id="CheckBox5" runat="server" Width="44px" Text="Fur"></asp:CheckBox>
<asp:CheckBox id="CheckBox2" runat="server" Text="Ball Gown"></asp:CheckBox> 
<asp:CheckBox id="CheckBox8" runat="server" Width="46px" Text="Premium"></asp:CheckBox> 
<asp:CheckBox id="CheckBox13" runat="server" Text="Modern"></asp:CheckBox> 
<asp:CheckBox id="CheckBox10" runat="server" Width="64px" Text="Beaded "></asp:CheckBox> 
<asp:CheckBox id="CheckBox7" runat="server" Width="58px" Text="Cocktail"></asp:CheckBox>
<asp:CheckBox id="CheckBox18" runat="server" Text="Party Dress"></asp:CheckBox>  
<asp:CheckBox id="CheckBox19" runat="server" Text="New Year"></asp:CheckBox> 
<asp:CheckBox id="CheckBox20" runat="server" Text="MotherDay"></asp:CheckBox></P>
<P>      ***  Please Tick
the subcategory to display Dresses </P>
</asp:Panel></TD>
</TR>
<TR>
<TD width="157"> </TD>
<TD width="171">                       
<asp:LinkButton id="LinkButton1" runat="server" Width="88px" Visible="False" onclick="LinkButton1_Click">Add Features</asp:LinkButton> 
<asp:Button id="Button1" runat="server" Text="Button" Height="24px" Visible="False" onclick="Button1_Click"></asp:Button>
<asp:Button id="Button2" runat="server" Text="Submit" Width="67px" BackColor="Sienna" onclick="Button2_Click"></asp:Button>
<asp:Button id="Button3" runat="server" BackColor="Sienna" Text="Cancel" Visible="False" onclick="Button3_Click"></asp:Button></TD>
<TD width="486"></TD>
</TR>
</TABLE>
<!--main --></td>
</tr>
<tr>
<td colSpan="2"> <!--bottom -->
<table cellSpacing="0" cellPadding="0" width="900" border="0">
<tr>
<td bgColor="#2c2f95" height="105"></td>
</tr>
<tr>
<td class="copyright" bgColor="#93c842" height="20">
<div align="right">Copyright © 2007 . All Rights Reserved.</div>
</td>
</tr>
</table> <!--bottom --></td>
</tr>
</table>
</td>
</tr>
</TABLE>
</form>
</div>
</body>
</HTML>


i m getting below error



'catalogmanager_new.WebForm4.DropDownList1_SelectedIndexChanged(object, System.EventArgs)' is inaccessible due to its protection level




Responses

#286557    Author: D.Jeya kumar(JK)      Member Level: Gold      Member Rank: 12     Date: 25/Aug/2008   Rating: 2 out of 52 out of 5     Points: 5

Hi,


You had added Dropdown box server side event and

<asp:DropDownList id="DropDownList1" runat="server" BackColor="#FFE0C0" Width="136px" Height="22px" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">


DropDownList1_SelectedIndexChanged

this should be in the code behind and that too public it should not be Protected or Private. as it cannot be access in the
OnSelectedIndexChanged event of the aspx page.

Please check the Access specified to Public in code behind as public.

Regards
JK

Thanks & Regards
D.Jeya Kumar(JK)



 
#302066    Author: Ravi Kiran Nedunuri      Member Level: Gold      Member Rank: 627     Date: 30/Sep/2008   Rating: 2 out of 52 out of 5     Points: 5

hi
in .aspx you declare drowdown list like this
<asp:DropDownList id="DropDownList1" runat="server" BackColor="#FFE0C0" Width="136px" Height="22px" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">


DropDownList1_SelectedIndexChanged

this should be in the code behind as Protected .


Please change the Access specifior in code behind to protected

this will solve your problem

Regards
N.Ravikiran



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : help in flash menu
Previous : Resolution problem
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
Today
    Last 7 Daysmore...

    Awards & Gifts
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.