TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suhail (Hacki)
NA
34
514
two category main categories and sub categories,
Sep 23 2017 6:52 AM
i want to display sub category into main category but here is problem of main category id ,how can it retrived into sub category please help me..
public partial class _Default : System.Web.UI.Page
{
protected CategoryManager obj;
protected SubCategoryManager obj2;
protected void Page_Load(object sender, EventArgs e)
{
obj = new CategoryManager();
obj2 = new SubCategoryManager();
Ltrmenu.Text = Menulinks();
// DataSet ds2 = obj2.AllSubCategories();
// //lbl.Text = ds2.Tables["Categories"].Rows[0]["Title"].ToString();
////lbl.Text =ds2.Tables[0].Rows[0]["Title"].GetParentRow["categoryid"].ToString();
// lbl.Text=ds2.Relations.Add(ds2.Tables["AllCategories"].Columns["Categoryid"],ds2.Tables[0].Rows[0]["Title"]);
}
public string Menulinks()
{
StringBuilder obj_html = new StringBuilder();
DataSet ds = obj.AllCategories();
DataSet ds2 = obj2.AllSubCategories();
lbl.Text = ds2.Tables[0].Rows[0]["Title"].ToString();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
obj_html.Append ( "<li>" + ds.Tables[0].Rows[i]["Title"].ToString() + " </li>");
}
return obj_html.ToString();
}
Reply
Answers (
1
)
How to print multiple reports for the same item
How to Show Notification Messages