hi
I have 2 page:
1-default.aspx and 2-software.aspx
in default.aspx I define megamenu that bind from database below is code:
<li><a href="#">Software</a>
<div id="mega6"></div>
<ul>
<asp:Repeater ID="Rptfilm" runat="server">
<ItemTemplate>
<li><a href='<%#"software.aspx?Secondclass="+Eval("Secondclass")%>' target="_blank">
<%#Eval("Secondclass")%></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
<li><a href="#">System</a>
<div id="mega7"></div>
<ul>
<asp:Repeater ID="rptSystem" runat="server">
<ItemTemplate>
<li><a href='<%#"software.aspx?Secondclass="+Eval("Secondclass")%>' target="_blank">
<%#Eval("Secondclass")%></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</li>
whan users click on Item from repeater it will go to software.aspx:
<a href='<%#"software.aspx?Secondclass="+Eval("Secondclass")%>' target="_blank"> <%#Eval("Secondclass")%></a>
and in sotware.aspx it will bind datalist according to users selected Item form megamenu:
if (!IsPostBack)
{
if (Request.QueryString["Secondclass"] != null)
{
this.GetCustomersPageWise(1);
}
}
and
private void GetCustomersPageWise(int pageIndex)
{
string Secondclass = Request.QueryString["Secondclass"];
using (SqlConnection conn = General.GetConnection())
{
using (SqlCommand cmd = General.GetCommand("GetCustomersPageWiseSoft", conn))
{
cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@PageIndex", pageIndex); cmd.Parameters.AddWithValue("@PageSize", PageSize); cmd.Parameters.AddWithValue("@Search", TxtsearchI.Text); cmd.Parameters.AddWithValue("@SecondClass", Secondclass);
cmd.Parameters.Add("@RecordCount", SqlDbType.Int, 4); cmd.Parameters["@RecordCount"].Direction = ParameterDirection.Output;
conn.Open();
SqlDataReader idr = cmd.ExecuteReader();
if (idr.HasRows)
{
DLSoft.DataSource = idr;
DLSoft.DataBind();
rptPager.Visible = !(rptPager2.Visible = false);
}
idr.Close(); this.PopulatePager(Convert.ToInt32(cmd.Parameters["@RecordCount"].Value), pageIndex);
}
}
}
now In software.aspx I define 2 datalist that bind from database and it will show Items that I bind that Items in megamenu in default.aspx
below is default.aspx page with megamenu:
there is two repeater that bind it from database and put it in megamenu...
and below is software.aspx page that I put 2 datalist on it and bind from database it will show Items that I put in megamenu I show Items with red and green arrow in both pages:
and codes:
<asp:DataList ID="Dlsystem" runat="server">
<ItemTemplate>
<asp:LinkButton ID="Linkbtnclass" runat="server" CssClass="lbldasteMS" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="Linkbtnclass_Click"><%# Eval("Secondclass") %></asp:LinkButton>
<div id="MM31S">
</div>
</ItemTemplate>
</asp:DataList>
<asp:DataList ID="DLclass" runat="server">
<ItemTemplate>
<asp:LinkButton ID="Linkbtnclass" runat="server" CssClass="lbldasteMS" CommandArgument='<%# Eval("Secondclass") %>'
OnClick="Linkbtnclass_Click"><%# Eval("Secondclass") %></asp:LinkButton>
<div id="MM31S">
</div>
</ItemTemplate>
</asp:DataList>
and:
BindDataList(DLclass, "Filmmenu");
BindDataList(Dlsystem, "SystemMenu");
now I want when I chose Item from megamenu in default.apx when I redirct to software.aspx it will change text's color of Item in datalist that I select that Item from megamenu:
see example here in default.aspx page I select item that I show with blue arrow:
now I want when it will go to software.aspx it will change text's color that I select from defualt.aspx like:
how I can do it?
Best Regards
Neda